Decimal Number Variable C# code example Example 1: Decimal Number Variable C# float number = 8.1f; Example 2: Decimal Number Variable C# float number = 8.1f;