Skip to content

Instantly share code, notes, and snippets.

@Fhernd
Created July 10, 2015 01:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fhernd/67171b81cac5d780e400 to your computer and use it in GitHub Desktop.
Save Fhernd/67171b81cac5d780e400 to your computer and use it in GitHub Desktop.
Demostración de expresiones estáticas en expresiones dinámicas.
// OrtizOL - xCSw - http://ortizol.blogspot.com
using System;
public class ResolucionEnlaceDinamico
{
#region Punto de entrada de ejecución
public static void Main()
{
object x = "xCSw";
dynamic y = "OrtizOL";
MostrarEnConsola(x, y);
}
#endregion
#region Métodos sobrecargados
public static void MostrarEnConsola(object param1, object param2)
{
Console.WriteLine("x");
}
public static void MostrarEnConsola(object param1, string param2)
{
Console.WriteLine("C");
}
public static void MostrarEnConsola(string param1, object param2)
{
Console.WriteLine("S");
}
public static void MostrarEnConsola(string param1, string param2)
{
Console.WriteLine("w");
}
#endregion
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment