is there any measurably performance difference between
((TypeA) obj).method1();
((TypeA) obj).method2();
((TypeA) obj).method3();
and
var A = (TypeA) obj;
A.method1();
A.method2();
A.method3();
when used alot of times?
I often see something like
if (((TextBox)sender).Text.Contains('.') || ((TextBox)sender).Text.Contains(','))
and wonder if this is a waste of performance.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…