Class Name Example in C#

Run at visual studio


Exemple :

class Customers
    {
        string _firstName;
        string _lastName;

        public Customers(string firstName,string lastName)
        {
            this._firstName = firstName;
            this._lastName = lastName;
        }

        public void PrintFullName()
        {
            Console.WriteLine("Your Full Name = {0}", this._firstName + " " + this._lastName);
        }
        ~Customers()
        {
            //clean code
        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            Customers C1 = new Customers("Kamrul","Hasan");
            C1.PrintFullName();
        }
    }
Share on Google Plus

About Unknown

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment