Posts

Showing posts with the label Constructors

Types of Constructor in C#

Constructor - Constructor is special kind of methods used for initialization of a class. Types of Constructors                 Default – Without having any parameter                 publicstring fName; public clsConnect()         {             fName = "First Name" ;         }                 Parameterized – Constructor at least one parameter                 publicstring fName; public clsConnect( string sFName)         {             fName = sFName...