Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It is perfectly well possible to create a method, class, struct, type or whatever in one .NET language that cannot be called by another <em>directly</em>. Calling it indirectly (by means of reflection, for instance) is always possible.</p> <p>I.e., if you look at any compiled C# project, you'll see that the compiled code contains some code with weird names and characters in it, usually for supporting generics. One such name is <code>&lt;Module&gt;</code> (including the brackets), which, even if it were made a public method, can never be called from C# directly.</p> <p>Language designers that decide to compile for the CLR must support a minimal subset for public types. This is referred to as <a href="http://msdn.microsoft.com/en-us/library/k5645wwb%28v=VS.100%29.aspx" rel="nofollow noreferrer">CLS Compliance</a> and is about <a href="https://stackoverflow.com/questions/570452/what-is-clscompliant-attribute-in-c-sharp">a common naming convention</a>, no public pointers or public unsafe members or classes, no names that only differ by case, no public static fields and <a href="http://msdn.microsoft.com/en-us/library/12a7a7h3%28v=vs.71%29.aspx" rel="nofollow noreferrer">some more rules</a>. When they obey to this rule it is guaranteed that any other .NET language can call your methods. They know how to do this, because the rules for this are well laid out and documented.</p> <p>You can even create <a href="https://stackoverflow.com/questions/1195030/why-is-this-name-not-cls-compliant">non-compliant C# code</a>. It will (usually) compile, but it is not guaranteed that all compliant languages can call your method. The same is true for most other languages, including C++.NET. It is a <a href="http://msdn.microsoft.com/en-us/library/ms182156%28v=vs.80%29.aspx" rel="nofollow noreferrer">Microsoft Design Guideline to mark your assemblies as CLSCompliant by default</a> (whether it's written in C++, VB, Ruby doesn't matter).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload