lundi 5 juin 2023

In this case, will C# use reflection or casting?

In c#, if I write code like this

dynamic target = "abcde";
dynamic arg = "c";
Console.WriteLine(target.Contains(arg));

Will C# use reflection to get the method "Contains," or cast dynamic as a string automatically and call the method "Contains"?





Aucun commentaire:

Enregistrer un commentaire