Thank's for the reply, I didn't mean to sound arrogant, or, maybe I did, but if so I was wrong to be. Probably I'm just frustrated that there seems to be a language barrier for me since I'm from sweden and english is not my native language.
Your long and informative answer explains a lot, nothing of it is new to me though, or at least I didn't think it was. How you are describing that cls-compliance works is exactly how I thought it worked before I posted. Then when I was asked if my assembly was decorated with the CLSCompliantAttribute I went and checked and saw that it wasn't. Actually it isn't "my" assembly since it belongs to my employer and there have been many developers working on it over time. When I applied the attribute to the assembly this fixed the problem and I don't get the warning anymore, therefore I re-thought how cls-compliance worked and thought, well maybe it's just based on if it has been marked cls-compliant or not. This is ofcourse where I was wrong as you've now pointed out. But then I'm really back to the original question, why was the warning raised for the public type I showed code examples for? There are no public members starting with an underscore, no members differing only by case (wouldn't even be possible in VB), no use of other non-cls-compliant types (if System.Windows.Forms.DialogResult is cls-compliant, wich I assume it is) and no overloaded operators. So is there any other rule for cls-compliant the type I supplied in my code example breaks?
1. Is it because the assembly was not marked as cls-compliant, but the type still was compliant, just considered non-compliant?
2. Is it because the type break any (to me not known) rule for cls-compliance?
If the first answer is correct then I still don't understand why the use of other public types from the assembly didn't generate any warnings because they (following the same logic) should be considered non-compliant as long as they're not explicitly marked as compliant.
If the second answer is correct then I still don't know what rule the class is in violation of.
The first answer seems to be the correct one to me, let's say assembly A is not marked as cls-compliant and exposes two types A1 and A2. In assembly B, which is marked as cls-compliant I make use of they type A.A1, now this should generate a warning right, because I've marked my assembly B as cls-compliant therefore instructing the compiler to enforce compliance and A.A1 is not considered compliant since it's not marked as compliant. But now I make use of the type A.A2 from my B-assembly, this should generate the same warning right, but in my case it didn't, wich I can't explain.
Also the msdn-documentation for the CLSCompliantAttribute states the following: "The current Microsoft Visual Basic compiler intentionally does not generate a CLS-compliance warning, however, a future release of the compiler will issue that warning" which seems a bit strange to me since this is in all the versions of the documenation (1.1, 2.0 and 3.0), I guess that's just wrong in the documentation though.
So, maybe you've already given me the answer to why I received a warning in one case but not in an other, but if you have I still haven't understood and then I guess I'm just plain stupid. Actually I'm probably just plain stupid anyway, but that's a whole different story ;-) I do very much appreciate the help so please don't let my sarcasms get to you...
Thank's in advance,
Patrik