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
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
0 comments: