5
Answers

C# string bytes

Sahil Dev

Sahil Dev

8y
294
1

 Can anyone tell me the number of bytes each string takes in C#?

That is: if I have:

  1. string value = "thisIsMyName"  
 
Then, how many bytes does the variable value take? 
 
Because, if I have:
 
If I want to convert to convert value into into a c# byte array how many bytes does it take?
Answers (5)