using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ProyectoIf
{
interface ITest
{
}
class TestClass : ITest
{
}
class IfValido
{
protected static TestClass GetTestClass()
{
return new TestClass();
}
public static void Main(string[] args)
{
int foo = 1;
if (foo > 0)
{
}
TestClass t = new TestClass();
if (t != null)
{
Console.WriteLine("{0}",t);
ITest i = t as ITest;
if (i != null)
{
//métodos ITest
}
}
Console.ReadLine();
}
}
}
No hay comentarios:
Publicar un comentario
*Dejanos Tus Comentarios*