CSharp examples for Custom Type:namespace
Using using and Namespaces
using System;//from w ww.j av a2s . co m class name { public string first; public string last; } class NameApp { public static void Main() { name you = new name(); Console.Write("Enter your first name and press enter: "); you.first = Console.ReadLine(); System.Console.Write("\n{0}, enter your last name and press enter: ", you.first); you.last = System.Console.ReadLine(); Console.WriteLine("\nData has been entered....."); System.Console.WriteLine("You claim to be {0} {1}", you.first, you.last); } }