Thursday, March 1, 2012

CSharp: Equivalent of final


Share at Facebook

If you want to declare a variable with final option of Java or const option of C++, that case you have to use the keyword readonly.

An example is :

public readonly int max = 100;




No comments: