Can this test pass?
 
var a = new A(); 

a.GetType().GetField("B").SetValue(a, 83); 
a.GetType().GetField("C").SetValue(a, 42); 

Assert.Equal(a.b, a.c);
 
Explanation
It can if A is a structure.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
C# quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes