I am trying to create a c# class, but I dont want it to be inherited. How can I accomplish that?
+13
A:
sealed
is the word you're looking for, and a link for reference
public sealed class MyClass
{
}
And then just create your class as normal, however you won't be able to inherit from it.
You can however still inherit from a different class like so
public sealed class MyClass : MyBaseClass
{
}
PostMan
2010-08-23 04:11:30