473,785 Members | 2,374 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Type of parameter is not CLS-compliant

I am getting a warning message:
Type of parameter 'nodParent' is not CLS-compliant
on the following statement. Anything I can do to satisfy the warning?

Public Sub LoadDirectoryNo des(ByVal directoryName As String, _
ByVal nodParent As
Crownwood.DotNe tMagic.Controls .Node)

*** Sent via Developersdex http://www.developersdex.com ***
Jan 3 '06 #1
1 12921
Slindee,
The "proper" way is not to expose non CLS-compliant publicly. Either ensure
that Crownwood.DotNe tMagic is CLS compliant, or ensure that the type/method
is not public (use Friend for example).
Alternatively you can mark the class, method, or even assembly as not
CLS-Compliant using the CLSCompliant attribute.

<CLSCompliant(F alse)> _
| Public Sub LoadDirectoryNo des(ByVal directoryName As String, _
| ByVal nodParent As
| Crownwood.DotNe tMagic.Controls .Node)

http://msdn.microsoft.com/library/de...classtopic.asp

--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
"Slindee" <an*******@deve loperdex.com> wrote in message
news:OM******** *****@TK2MSFTNG P15.phx.gbl...
|I am getting a warning message:
| Type of parameter 'nodParent' is not CLS-compliant
| on the following statement. Anything I can do to satisfy the warning?
|
| Public Sub LoadDirectoryNo des(ByVal directoryName As String, _
| ByVal nodParent As
| Crownwood.DotNe tMagic.Controls .Node)
|
|
|
| *** Sent via Developersdex http://www.developersdex.com ***
Jan 3 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2737
by: wkaras | last post by:
I would like to propose the following changes to the C++ Standard, the goal of which are to provide an improved ability to specify the constraints on type parameters to templates. Let me say from the start that my knowledge of compiler implementation is very limited. Therefore, my suggestions may have to be rejected because they are difficult or impossible to implement. The proposal is based on the concept of "type similarity". Type...
3
10370
by: Martin Montgomery | last post by:
I am passing a System.Type parameter into a method. I would like to create an object of that type from the System.Type. for example public CreateAnObject( System.Type objectType) { m_MemberObject = new "The class represented by objectType"; } and called by
2
2465
by: nospamnntp | last post by:
What is the point of the Type Parameter in RegisterStartupScript? What other options do you have except string??? TIA!
1
1675
by: Jinsong Liu | last post by:
Hello Group: I am playing with .NET 2.0 Generic. I have a CarsList<T> Generic class, Is it possible that I can control what T could be? I want to ensure the T can only be classes derived from a specific class (lets say Car). I understand that I can create a CarList without using Generic, but when I add a derived class to the list, type conversion will happen, and I will not be able to enforce type at child class level.
7
5459
by: john | last post by:
Hi to All I would like to do something similar: class Class1<T1> { } class Class2<T2, T1where T2: Class1<T1>, new() {
1
4859
by: Néstor Sánchez A. | last post by:
Hi, is there a way, maybe using reflection, to use a generic class passing the type parameter dynamicly (not kwnowing the exact type at compile time)? I tried the next example, but doesn't work: public abstract class Vehicle { ... } public class Aircraft : Vehicle { ... }
1
3431
by: interX | last post by:
Hi I'm new in VC++ and have a question to generics. I have a generic class, which contains an array of the generic type. This array I can pin and then I would like to get an unmanaged pointer to it. Therefore I wanted to creat a class member which represents the pointer to the array. Unfortunately I get the folowring compile error for the code beneath: error C3229: 'DataType *' : indirections on a generic type parameter
4
7684
by: Andrus | last post by:
I tried to use type parameter to call static method but got compile error 'T' is a 'type parameter', which is not valid in the given context. Why this is not allowed ? Should I really use a lot longer ModelGenericBase<T>.test1() ? Andrus.
0
5888
debasisdas
by: debasisdas | last post by:
This thread contains some of the sample code showing the method of executing Oracle stored procedures and functions from VB . Hope the user finds them useful. Oracle Procedure with only IN type as parameter mode. ======================================== CREATE OR REPLACE PROCEDURE DEPTINS ( DNO DEPT.DEPTNO%TYPE, DN DEPT.DNAME%TYPE,
9
3154
by: tadmill | last post by:
Is it possible to pass a generic parameter of the same class to to its constructor, where the "T" type passed in the constructor is different than the "T" type of the instanced class? ie, public class SomeList<T> { public SomeList(SomeList<TthisSomeList)
0
10346
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9956
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8982
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6742
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5386
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5514
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4055
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3658
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2887
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.