C# 11 ) CONSTRUCTER
* CONSTRUCTER *
- int a ; object
- int a=10; initilization
- Constructer is a object initilization process. ex. my m1=10 ;
Rules
- Class name and Method name are similar.
{
Public my( )
{
}
}
- Constructer Method not use (void).
- Constructer always Public.
- Constructure Automticaly access with object creation
{
}
main
{
main
{
my m1 =new my( );
}
}
- m1.show( );,m1.display( ) not use in constructer.
Comments
Post a Comment