L
Leon_Amirreza
Hi,
We have byValue and ByReference in VB and out and ref parameters in C#
1- ref parameter expects an initialized variable
2- out should be initialized before return
First Question: How can I have a parameter remain uninitialized after a
return (that compiler expects to be initialized even after the invokation of
the method)? (compiler designer might need to add a runtime error for
reading from an uninitialized variable)
Second Question: Somtimes compiler naggs about that not all code paths
return a value? how can I assure the compiler it always return a value?
We have byValue and ByReference in VB and out and ref parameters in C#
1- ref parameter expects an initialized variable
2- out should be initialized before return
First Question: How can I have a parameter remain uninitialized after a
return (that compiler expects to be initialized even after the invokation of
the method)? (compiler designer might need to add a runtime error for
reading from an uninitialized variable)
Second Question: Somtimes compiler naggs about that not all code paths
return a value? how can I assure the compiler it always return a value?