{"id":18,"date":"2007-07-30T15:00:00","date_gmt":"2007-07-30T20:00:00","guid":{"rendered":"http:\/\/blogs.devhorizon.com\/reza\/?p=18"},"modified":"2007-11-21T17:37:21","modified_gmt":"2007-11-21T22:37:21","slug":"non-cls-compliant-classes-in-sdk-what-that-means","status":"publish","type":"post","link":"https:\/\/blogs.devhorizon.com\/reza\/2007\/07\/30\/non-cls-compliant-classes-in-sdk-what-that-means\/","title":{"rendered":"non CLS-compliant classes in SDK, what that means?"},"content":{"rendered":"<p>When you browse SharePoint SDK , you come across some classes such as <a href=\"http:\/\/msdn2.microsoft.com\/en-us\/library\/microsoft.sharepoint.publishing.webcontrols.contentbyquerywebpart.aspx\">ContentByQueryWebPart <\/a>which is marked as non CLS-compliant classes. This class or any derived type may not be interoperable with a wide range of .Net supported programming languages.Something that you really need to consider when using this calss or driving your custom types off of it. Generally, C# complier does not check for CLS compliance of your code and you have to explicitly instruct it to do so.<\/p>\n<p> This class for whatever reason is not decorated to be CLS-compliant and it should be used with extra caution in regards to interoperability.<\/p>\n<p> [CLSCompliant(false)]<br \/>\n public class ContentByQueryWebPart : CmsDataFormWebPart<br \/>\n {<br \/>\n &#8230;..<br \/>\n }<\/p>\n<p> <img loading=\"lazy\" decoding=\"async\" width=\"1\" src=\"\/\/blogs.devhorizon.com\/aggbug.aspx?PostID=489\" height=\"1\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you browse SharePoint SDK , you come across some classes such as ContentByQueryWebPart which is marked as non CLS-compliant classes. This class or any derived type may not be interoperable with a wide range of .Net supported programming languages.Something that you really need to consider when using this calss or driving your custom types [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[3],"class_list":["post-18","post","type-post","status-publish","format-standard","hentry","category-moss-2007","tag-moss-2007"],"_links":{"self":[{"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/posts\/18","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/comments?post=18"}],"version-history":[{"count":0,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/posts\/18\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/media?parent=18"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/categories?post=18"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.devhorizon.com\/reza\/wp-json\/wp\/v2\/tags?post=18"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}