The sealed can be used to prevent a class to be inherited.
sample:
sealed class FileClass
{
sealed FileClass(string filepath)
{
Filepath = filepath;
}
private string _filepath;
public string Filepath
{
get { return _filepath;}
set { _filepath = Filepath; }
}
}
No comments:
Post a Comment