using System;
//csc Interface_get_set1.cs
namespace ConsoleApplication1
{
public interface Iname
{
string Name { get; set;} //
signature
}
public class RP : Iname // inherit
{
private string name;
public string Name //
implementing interface method
{
get {return name;}
set {name =value + " welcome";}//editing
input with set
}
}
class Programm
{
static void Main(string[] args)
{
Console.WriteLine("Your name please");
string str1 = Console.ReadLine();
RP rp1 = new RP();
rp1.Name = str1;
Console.WriteLine(rp1.Name);
Console.ReadLine();
}
}
}