Simple example of Structure in C#

Sourav.Kayal
Posted by Sourav.Kayal under C# category on | Points: 40 | Views : 1562
using System;
using System.Linq;
using System.Text;
using System.Collections;
using System.Data;
using System.Xml;
using System.IO;
using System.Diagnostics;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Threading;
namespace BlogProject
{
class Program
{
struct Hello //Defination of structure
{
public void Hi()
{
Console.WriteLine("I am hi function");
}
}

static void Main(string[] args)
{
Hello h = new Hello(); //Object of Strecture
h.Hi();
Console.ReadLine();
}
}
}

Comments or Responses

Login to post response