Wednesday 22 August 2012

c#.net how to use namespace and class and creat object

simple program in c#.net  how to use namespace and class and creat object

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

namespace constant
{
class Program
{
int i = 10;
float j = 3.4f; // here we will use 3.4f not only 3.4//


public void display()
{
Console.Write("roll  number"+i+"\n"+"salary ="+j +"rs");
}

static void Main(string[] args)
{
Program p = new Program();
p.display();

}
}
}


output of the program

program //simple program in c#.net  how to use namespace and class and create object//


roll no=10
salary =3.4 rs
Share This
Previous Post
Next Post

FYJC XI standard online admisson Process and declaraton of Merit list . Cut off List For prevous year also . 10 Th Results onlne declaraton Maharashtra Region .

0 comments: