static void Main(string[] args) { Console.WriteLine("KARDEX DE INGENIERÍA BIOMÉDICA \n"); Class1.Datos(); Console.WriteLine("Servicios: \n"); int servicio; Console.WriteLine("1. Clases según el semestre que cursas"); Console.WriteLine("2. Calificaciones finales"); Console.WriteLine("3. Especialidades de la carrera"); servicio = int.Parse(Console.ReadLine()); switch (servicio) { case 1: Class2.Semestre(); break; case 2: Class3.Calificaciones(); break; case 3: Class4.Especialidades(); break; default: Console.WriteLine("Esta opción no existe"); break; } Console.ReadKey(); }
// Main Method public static void Main(String[] args) { Class4 t1 = new Class4(); t1.display(); Console.ReadLine(); }
static void Main(string[] args) { Class1 cls1 = new Class1(); var x = cls1.publicVar; //x = cls1.privateVar; //x = cls1.protectedVar; //x = cls1.internalVar; //x = cls1.protectedInternalVar; //x = cls1.privateProtectedVar; Class4 cl4 = new Class4(); x = cl4.publicVar; }
public void readerExpression <T>(Expression <Func <T, bool> > expression) { MemberExpression member; ConstantExpression constant; Expression left, right; switch (expression.Body.NodeType) { case ExpressionType.AndAlso: BinaryExpression be = expression.Body as BinaryExpression; Class4 class4 = new Class4(); if (be != null) { class4.left = be.Left as LambdaExpression; class4.operand = Operand.And; class4.right = be.Right as LambdaExpression; } list.Add(class4); exp <T>(class4.left as Expression <Func <T, bool> >, class4.operand, class4.right as Expression <Func <T, bool> >); break; //case ExpressionType.Equal: // BinaryExpression binary = expression.Body as BinaryExpression; // if (binary != null) // { // member = binary.Left as MemberExpression; // constant = binary.Right as ConstantExpression; // } // break; case ExpressionType.OrElse: BinaryExpression binaryExpression = expression.Body as BinaryExpression; Class4 class1 = new Class4(); if (binaryExpression != null) { class1.left = binaryExpression.Left as LambdaExpression; class1.operand = Operand.And; class1.right = binaryExpression.Right as LambdaExpression; } list.Add(class1); LambdaExpression lambdaExpression1 = class1.left as LambdaExpression; exp <T>(class1.left as LambdaExpression, class1.operand, class1.right as Expression <Func <T, bool> >); break; } }
static void Main(string[] args) { Class4.Run(); Console.Read(); }