constants - In C# how do you accomplish the same thing as a #define -


Coming from a background I used to define the size of the buffer in the following way:

# BUFFER_SIZE 1024 uint8_t buffer [BUFFER_SIZE];

How do you accomplish the same thing in C #?

In addition to the normal C # Pascal / Camel, all Caps have R & R style fit?

  const int BUFFER_SIZE = 1024; Do not use "Stable reading" because it creates a variable "CONST" is changed at build time and does not create variables. 


Comments