Interviews4 answers
Is the below statement Valid in C# ? Using(int x=23) { }
4 Answers
statement is not valid. It will give below error :- 'int': type used in a using statement must be implicitly convertible to 'System.IDisposable'
rajesh thakurPosted Feb 27, 2018, 10:46 AM EST
Yes
Mukesh KumarPosted Sep 12, 2017, 6:05 AM EDT
Not valid, throw an error.
Raghvandra ShuklaPosted Mar 27, 2016, 5:08 AM EDT
statement is not valid. It will give below error :-
'int': type used in a using statement must be implicitly convertible to 'System.IDisposable'
sushil kumarPosted Jan 4, 2016, 1:33 AM EST

