Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
C# dynamic issue
class Program
{
public static void Main()
{
dynamic data = new { SomeProperty = "ABC" };
var response = IsTrue(data);
if (response == "1")
{
Console.WriteLine("How can this compile?");
}
}
private static bool IsTrue(object someData)
{
return true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.