{"id":1135,"date":"2022-05-10T11:16:58","date_gmt":"2022-05-10T10:16:58","guid":{"rendered":"https:\/\/ibex.tech\/windows-iot\/?p=1135"},"modified":"2023-03-15T10:52:22","modified_gmt":"2023-03-15T10:52:22","slug":"determing-an-objects-type","status":"publish","type":"post","link":"https:\/\/ibex.tech\/csharp\/uwp-programming-in-c\/memory-uwp-programming-in-c\/objects\/determing-an-objects-type","title":{"rendered":"Determing an objects Type"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>private void My MethodName(object MyObjectName)\n{\n\tswitch (Convert.GetTypeCode(MyObjectName))\n\t{\n\tcase TypeCode.Boolean:\n\t\tbreak;\n\n\tcase TypeCode.Byte:\n\t\tbreak;\n\n\tcase TypeCode.Char:\n\t\tbreak;\n\n\tcase TypeCode.DateTime:\n\t\tbreak;\n\n\tcase TypeCode.Decimal:\n\t\tbreak;\n\n\tcase TypeCode.Double:\n\t\tbreak;\n\n\tcase TypeCode.Int16:\n\t\tbreak;\n\n\tcase TypeCode.Int32:\n\t\tbreak;\n\n\tcase TypeCode.Int64:\n\t\tbreak;\n\n\tcase TypeCode.SByte:\n\t\tbreak;\n\n\tcase TypeCode.Single:\n\t\tbreak;\n\n\tcase TypeCode.String:\n\t\tbreak;\n\n\tcase TypeCode.UInt16:\n\t\tbreak;\n\n\tcase TypeCode.UInt32:\n\t\tbreak;\n\n\tcase TypeCode.UInt64:\n\t\tbreak;\n\n\t} \/\/switch (Convert.GetTypeCode(MyObjectName))\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[120,119],"tags":[],"class_list":["post-1135","post","type-post","status-publish","format-standard","hentry","category-objects-uwp-programming-in-c","category-objects"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/1135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/comments?post=1135"}],"version-history":[{"count":1,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/1135\/revisions"}],"predecessor-version":[{"id":1279,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/1135\/revisions\/1279"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/media?parent=1135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/categories?post=1135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/tags?post=1135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}