I have this code after decompile
SampleClass sampleClass;
SampleClass <>g__initLocal0;
int y;
sampleClass = null;
Label_0018:
try
{
<>g__initLocal0 = new SampleClass();
<>g__initLocal0.X = 5;
<>g__initLocal0.Y = 10;
sampleClass = <>g__initLocal0;
goto Label_003A;
}
catch (Exception)
{
Label_0035:
goto Label_003A;
}
Label_003A:
y = sampleClass.Y;
I don't know what mean operator/symbol <> before some operations. Does somebody know?
On the Internet, @ (pronounced "at" or "at sign" or "address sign") is the symbol in an E-mail address that separates the name of the user from the user's Internet address, as in this hypothetical e-mail address example: [email protected].
The @ symbol is correctly referred to as an asperand.
The at sign is most commonly found in email addresses and on social media, where it is used to tag specific users in posts. The symbol, @, can also stand in for the word at in everyday writing and in online conversation, where it is often used as a verb.
It's a compiler generated name - the <>
characters are legal for identifiers in IL, but not in C#. So, the compiler knows it can generate names containing such characters without any chance that the name will conflict with a name you've used in your code.
In this particular case, <>g__initLocal0
is a new variable that has been introduced to hold a newly constructed instance of a class which is being initialized using initializer syntax. The original code was:
sampleClass = new SampleClass() { X = 5, Y = 10};
It's introduced to avoid sampleClass
being observed with the partially constructed instance - after new SampleClass()
has executed but before the assignments to X
and Y
occur. I.e. if Y = 10
throws an exception, it ensures that sampleClass
remains null
and not a new SampleClass
with X
set to 5 and some unknown value for Y
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With