Support us .Net Basics C# SQL ASP.NET Aarvi MVC Slides C# Programs Subscribe Download

Part 19 - C# Tutorial - Introduction to classes

Part 19 - C# Tutorial - Introduction to classes


  1. I was looking for the answer of the question why classes are called user defined data type? Please define this.

    1. 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.

  2. code in a class is written by the user that's why we are calling it as user defined data type ...

  3. 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.

  4. Hi sir i am new in c# and your videos helping for me thank you. and this session i was practice it will be show error code can resolve-
    "CS5001 C# Program does not contain a static 'Main' method suitable for an entry point"


It would be great if you can help share these free resources