can connectionstate be accessed in this line "ConnectionState [System.Data] System.Data.SqlClient.SqlConnection.get_State()"  
Author Message
Guns





PostPosted: Visual Studio Code Analysis and Code Metrics, can connectionstate be accessed in this line "ConnectionState [System.Data] System.Data.SqlClient.SqlConnection.get_State()" Top

Hi,

i need to access the connection state in the below line.

"IL_001d callvirt ConnectionState [System.Data] System.Data.SqlClient.SqlConnection.get_State()".

I need to access the word marked in red background. Can this be done

Thanks in advance.




Visual Studio Team System9  
 
 
Jeffrey van Gogh - MSFT





PostPosted: Visual Studio Code Analysis and Code Metrics, can connectionstate be accessed in this line "ConnectionState [System.Data] System.Data.SqlClient.SqlConnection.get_State()" Top

Hi Guns,

if you need the return type of a method call, find the method call (as I described to you in earlier post) and then use Method.ReturnType.

Regards,

Jeffrey