We provide IT Services

Register Now Click On

Read More Tutorials Click On

Post Page Advertisement [Top]

what is class

Class is a collection of data member and member function in an objected programming language. Data member is just like Data type and Member function 
just like a method of class. 

Some points of class:-

Class is a user define datatype,

Class is a Keyword,

Class is a Contener,

Class is a blue print,

Write A Simple Program a Class- Example

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Class
    class Animal
        public string name = "Digveshwar";
        public int Age = 24;
        public void Print()
       Console.WriteLine("Enter the Value of Nmae :" +name);
        Console.WriteLine("Enter the value of Age :" + Age);
    class Program
        static void Main(string[] args)
            Animal obj = new Animal();


No comments:

Post a Comment

| Designed by Rockprogrammer