google.com, pub-5796814184912345, DIRECT, f08c47fec0942fa0 program to work with User Defined Default Constructor
02 05 08

program to work with User Defined Default Constructor


program to work with User Defined Default Constructor:

Class Diagram:

employee1
Int EmpId
String EName
String EAddress
Int EAge
Public employee1()
Public void DisplayEmpData()





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

namespace CAConstructors
{
    class employee1
    {
       int Empid, Eage;
       string Ename, Eaddress;
       public employee1()
    {
        Console.WriteLine("Enter Employee Detailes:-");
        this.Empid = 101;
        this.Ename = "srikanht";
        this.Eaddress = "Hyderabad";
        this.Eage = 25;

    }
        public void DisplayEmpdata()
        {
            Console.WriteLine("Employee id is :-"+Empid);
            Console.WriteLine("Employee Name is :-" + Ename);
            Console.WriteLine("Employee Adderse is :-" +Eaddress);
            Console.WriteLine("Employee age is :-" + Eage);
        }
    }
    class UDConstructor
    {
        static void Main(string[] args)
        {
            employee1 obj1 = new employee1();
            employee1 obj2 = new employee1();
            obj1.DisplayEmpdata();
            obj2.DisplayEmpdata();
            Console.ReadLine();
        }
    }
}
Output:-


Latest Walkins 2013(updated every day )



Hyderabd Walkins 2013

walkins in chennai2013-14

walkins in Chandigarh2013

Walkins In Mumbai 2013

pune In Walkins 2013

Kolkata in walkins 2013

Ahmedabad JOBS 2013

Banglore walkins

Dotnet jobs

09 10

0 comments:

  © Blogger templates Newspaper III by Ourblogtemplates.com 2008

Back to TOP