Given this class...
public class Test
{
private long _id;
public Test(long id)
{
_id = id;
}
}
Will the .Net compiler actually compile it as...
public class Test
{
private readonly long _id;
public Test(long id)
{
_id = id;
}
}
In other words, does it understand that _id is only ever set from the constructor and is, therefore, readonly?