SubClass
Namespace: MyClassLib.SubNamespace
Sub class from MyClass
public sealed class SubClass : MyClassLib.MyClass, MyClassLib.IMyInterface
Inheritance Object → MyClass → SubClass
Implements IMyInterface
Remarks:
A remark.
Fields
myField
My field.
public int myField;
myRequiredField
A required field.
public required int myRequiredField;
myProtectedField
My field.
protected int myProtectedField;
Properties
MyProperty
My property.
public string MyProperty { get; protected set; }
Property Value
String
The property value. Used by MyClass.DoGeneric<T>(T).
Example
This example assign "foo" to MyProperty.
foo.MyProperty = "foo";
MyNullableProperty
My nullable property
public int? MyNullableProperty { get; set; }
Property Value
Int32?
The nullable property value.
MyEnum
My enum
public MyEnum MyEnum { get; set; }
Property Value
MyEnum
The enum value
MyInitProperty
An init-only property.
public string MyInitProperty { get; init; }
Property Value
String
The initialization value.
MyRequiredProperty
A required property.
public required string MyRequiredProperty { get; set; }
Property Value
String
The required value.
MyProtectedProperty
My property.
protected string MyProtectedProperty { get; set; }
Property Value
String
The property value. Used by MyClass.ProtectedDoGeneric<T>(T).
MyProtectedEnum
My enum
protected MyEnum MyProtectedEnum { get; set; }
Property Value
MyEnum
The enum value
Constructors
SubClass()
Sub class from MyClass
public SubClass()
Remarks:
See also MyClass.MyClass(String, Int32).
if (true)
{
var foo = new MyClass("foo", 1);
Console.WriteLine(foo.ToString());
}
- item 1 - The first item.
1 - item 2 - The second item.
2
Methods
ToString()
Convert instance to string.
public override string ToString()
Returns
String
A string.
Events
MyEvent
My event.
public event EventHandler<EventArgs>? MyEvent;
MyProtectedEvent
My event.
protected event EventHandler<EventArgs>? MyProtectedEvent;