Why does C # append get a property in a class written in VB.net?

If we make any class in VB.NET and try to access its property in C # by creating an object of that class. get_ is added to the property. Can someone explain the reason.

+1


source to share


1 answer


Oh it could be because the integer is:

  • get{}

  • set{}

business actually translates into the equivalent:



  • get_PropertyName

  • set_PropertyName

In IL code. All the stuff we write (in VB

or out C#

) is just syntactic sugar.

+2


source







All Articles