5
Reply

C# string bytes

Sahil Dev

Sahil Dev

Sep 2 2016 12:57 PM
279

 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)