I code in C# primarily these days, but I coded for years in VB.NET. In VB, I could combine a character constant and a string literal to create other constants, which is very handy:
Const FileExtensionSeparatorCharacter As Char = "."c
Const BillingFileTypeExtension As String = FileExtensionSeparatorCharacter & "BIL"
Now I'd like to do the same in C#:
const char FileExtensionSeparatorCharacter = '.';
const string BillingFileTypeExtension = FileExtensionSeparatorCharacter + "BIL";
but this give me a compiler error:
The expression being assigned to 'BillingFileTypeExtension' must be constant
Is there a reason I can't do this in C#?