1

Recently, I'm working on serialization with C#.

I found that the automatic-properties' fields are named "<...>k_BackingField".

So my problem is dose this naming rule same in all .Net versions, and it won't change in any situations?

Rick12321
  • 21
  • 4

1 Answers1

2

It's an internal implementation that may change between the different versions of the C# compiler.

The different serialization mechanisms provided by the libraries have different compatibility rules. For instance, I do not believe that binary serialization is guaranteed to work between different versions of the framework.

Daniel A. White
  • 187,200
  • 47
  • 362
  • 445