CSharp examples for Custom Type:struct
Create struct with two member fields
using System;// w ww. j av a 2 s . c o m using System.Collections.Generic; using System.Text; public struct Coordinates { public double Longitude { get; set; } public double Latitude { get; set; } } class Program { static void Main(string[] args) { Coordinates c = new Coordinates(); c.Longitude = 45.67890; c.Latitude = 38.79851; Console.WriteLine("I am here: ( {0} , {1} )", c.Longitude, c.Latitude); } }