tag:blogger.com,1999:blog-19519354.post115084018860108401..comments2023-06-30T13:58:14.439+01:00Comments on Doogal Bell's bloggy thing: What is System.RuntimeType?Doogalhttp://www.blogger.com/profile/17764319095707998627noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-19519354.post-84109343549893210352011-02-27T23:36:17.580+00:002011-02-27T23:36:17.580+00:00I just have to say, usually never comment on usefu...I just have to say, usually never comment on useful information Google produces, but, this has saved my ass. Thanks a bundle!Appelnoreply@blogger.comtag:blogger.com,1999:blog-19519354.post-38628575372997548122010-10-14T16:51:06.072+01:002010-10-14T16:51:06.072+01:00Here's a useful snippet I put together for thi...Here's a useful snippet I put together for this very thing:<br /><br /><br /> If sqlReader.HasRows() Then<br /> sqlReader.Read()<br /> For Each row As DataRow In sqlReader.GetSchemaTable.Rows<br /> Debug.Write(String.Format("""{0}""", "ColumnName = " & row("ColumnName")))<br /> Debug.WriteLine("")<br /> Debug.Write(String.Format("""{0}""", "DataType = " & row("DataType").Name))<br /> Debug.WriteLine("")<br /> Debug.Write(String.Format("""{0}""", "ProviderSpecificDataType = " & row("ProviderSpecificDataType").Name))<br /> Debug.WriteLine("")<br /> Debug.Write(String.Format("""{0}""", "DataTypeName = " & row("DataTypeName")))<br /> Debug.WriteLine("")<br /> Debug.WriteLine("")<br /> Next<br /> End IfMr. Helperhttp://twitter.com/Mister_Helpernoreply@blogger.comtag:blogger.com,1999:blog-19519354.post-86253818857878232012008-09-01T10:53:00.000+01:002008-09-01T10:53:00.000+01:00You can use the GetSchemaTable() method of the rea...You can use the GetSchemaTable() method of the reader to return you information about the columns.<BR/><BR/>Also a value of RuntimeType can be cast to Type.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-19519354.post-67200918081707739552008-04-18T22:22:00.000+01:002008-04-18T22:22:00.000+01:00Passing a generic instance to an extension method ...Passing a generic instance to an extension method for object, I needed access to System.RuntimeType in order to check IsGenericType. You provided a very clever solution to getting it. Thanks!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-19519354.post-79732682775122317162007-12-21T16:25:00.000+00:002007-12-21T16:25:00.000+00:00Awesome example to get the underlying RuntimeType;...Awesome example to get the underlying RuntimeType; saved me a couple of hours.<BR/><BR/>ThanksGavinhttps://www.blogger.com/profile/11930444405412348339noreply@blogger.com