public void SetName(string NewName)
public string ReadName ()
public static void Main()
Person P1 = new Person();
cadena C1 = new cadena();
cadena C2 = new cadena();
cadena Comp = new cadena();
Console.WriteLine("ingrese string");
string L = Console.ReadLine();
Console.WriteLine("ingrese string");
Comp.SetName(Compara_s (C1.ReadName(), C2.ReadName())) ;
Console.WriteLine("cadenas son {0}", Comp.ReadName() );
public static cadena Compara (cadena C1, cadena C2)
cadena Res = new cadena();
for (int i = 0; i < C1.s.Length; i++)
if (Cad1.s[i] == Cad2.s[i])
if (cont == Cad1.s.Length)
public static string Compara_s (string C1, string C2)
for (int i = 0; i < C1.Length; i++)