The process of the compiler translating high level syntax sugar into lower level code in the same language (i.e. not compiling to bytecode).
This code
public class Test {
int? A { get; set; }
int? B;
}
will be translated into this
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
public class Test
{
[CompilerGenerated]
private Nullable<int> <A>k__BackingField;
private Nullable<int> B;
private Nullable<int> A
{
[CompilerGenerated]
get
{
return <A>k__BackingField;
}
[CompilerGenerated]
set
{
<A>k__BackingField = value;
}
}
}
(interesting to see the backing field generated for the property!)
You can see what gets generated using SharpLab
https://mattwarren.org/2017/05/25/Lowering-in-the-C-Compiler/