Skip to main content
Community Admin
Apr 3, 2026 1:02 PM UTC

Tech Talks: Playing with (and by) the Rules - C# and VB.Net - a Side by Side Comparison

Tech Talks welcomes back Sam Eburn with Marcio Pataca as they join Tom Linton and Matt Kerslake to explore rule writing and in particular the sibling rivalry between C# and VB.Net

Key Topics Covered

  • Rules in OneStream: a broad topic this series continues to explore; session focuses specifically on C# vs. VB.NET
  • Evolution of rules in OneStream: VB.NET capabilities are essentially frozen — C# unlocks new .NET framework features with each major platform release (e.g., .NET Core 6 with platform version 8)
  • C# vs. VB.NET: the syntactic differences are smaller than they appear; developers familiar with VB.NET can make the transition with persistence
  • Side-by-side code comparison: a Custom Calculate Finance Rule written in both VB.NET and C# to show where the languages differ and where they are nearly identical
  • Data buffers and filtered data buffers: standard patterns for retrieving and filtering cell data within a rule
  • Null handling: VB.NET uses 'Nothing'; guard clauses (null checks) are both a performance optimization and an error prevention measure — don't calculate with empty data
  • Logging during development: including log lines while building rules to aid debugging, then removing before production
  • Constructing new data buffer objects and looping through source buffers to build target cell collections
  • Dictionaries in C#: fast key/value lookups using hashing; ideal for scenarios requiring frequent navigation through large data sets
  • Using OneStream data unit properties (scenario, time, entity) composed as a Record to serve as a unique, hashable dictionary key for very fast lookups
  • Developer Toolkit: allows developers to use any IDE they choose (with full IntelliSense support) instead of being limited to the built-in OneStream IDE
  • Financial Rules and Calculations Handbook: a companion resource with a full Tech Talks series (with Jon Golembiewski) covering finance rules line by line
  • After Hours episodes planned: line-by-line code walkthroughs of the examples shown in this live session
  • Resources: Navigator (search 'C#' for available content), Microsoft documentation for both VB.NET and C#