Free C#, .Net and Sql server video tutorial for beginners and intermediate programmers.
I was looking for the answer of the question why classes are called user defined data type? Please define this.thnx.
Not quite, but User-defined data types and classes can both contain multiple variables of different data types like combination of primitive data types (long, int,float etc) specified by the user. But unlike user-defined data types, classes can also contain procedures (properties and methods) that operate on those variables. Classes can be derived from existing classes called base class but User-defined data types cannot.
code in a class is written by the user that's why we are calling it as user defined data type ...
Hi Sir,As you are saying in constructor all fields got initialise with values.Then I am confused with declaration of variable and assigning value to it.Ex : private _str="pregim";if it will initilize in constructor then why system allowing me to do so.
If you like this website, please share with your friends on facebook and Google+ and recommend us on google using the g+1 button on the top right hand corner.