Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 810661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:55:16+00:00 2026-05-15T00:55:16+00:00

CLS allows private portions of the code in classes to be non CLS compliant.

  • 0

CLS allows private portions of the code in classes to be non CLS compliant. How is this possible, because ultimately the code needs to be converted to the IL ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T00:55:17+00:00Added an answer on May 15, 2026 at 12:55 am

    CLS stands for Common Language Specification. To simplify, it’s basically the minimal types and identifiers that all .NET languages must know about. For example, Int32 is CLS-compliant: any .NET language must be able to handle it. UInt32 is not. Since your code is private, it won’t be accessed by other assemblies in other languages so it doesn’t matter if it is CLS-compliant or not.

    See this MSDN page for more information about CLS-compliance.

    Edit: I think you misunderstand what CLS compliance is. It’s not about whether the code can be compiled into IL or not. UInt32 can be used in IL. So does an identifier named ‘©’. CLS-compliance is just a minimal contract for language interoperability. What the CLR supports is way broader than the limitations for CLS compliance.

    Edit2: Yes, you’re right. A .NET language is required to support Int32, not UInt32, even if has a direct mapping to IL. See pointers, they’re supported in IL and in C# but are not CLS compliant. VB.NET doesn’t implement a support for them and still is CLS-compliant.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: class SomeClass: @classmethod def func1(cls,arg1): #---Do Something--- @classmethod def func2(cls,arg1):
I have this code: try: principal = cls.objects.create( user_id=user.id, email=user.email, path='something' ) except IntegrityError:
Consider the following code that is not CLS Compliant ( differs only in case
Just for my clarification: Can I throw both CLS-compliant and non-CLS compliant exceptions in
I have this normal code for notification alert: - (void)saveNotification { Class cls =
I want to do something like this: class Cls { function fun($php) { return
In this answer a singleton decorator is demonstrated as such def singleton(cls): instances =
I have a singleton implemented like this: class Test123(object): _instance = None def __new__(cls,
I know the prototype and arguements this function takes id class_createInstance(Class cls, size_t extraBytes)
Below is my requirement. @echo off cls Set Sleep=0 :start echo This is a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.