Dear friends,

I have implemented a Managed C++ library that is to be consumed from C# and 
VB.NET applications (or from other .NET languages, of course, but the focus is 
on these two). I do not use VB and somewhat missed the fact that it does not 
directly support unsigned types (although I have heard about plans to add such 
functionality to future versions).

So, the question is as follows: Given that VB programs can use unsigned types 
in some indirect way (through e.g. Convert.ToUInt*()), although it is probably 
inconvenient, what would be the recommended approach? Simply ignore the problem 
or add additional methods/properties/indexers using signed, CLS-compliant 
types? If the latter is preferred, then what are type/naming conventions that 
should be used in the following cases (unsigned types based methods, C# syntax 
used):

void DoSomething(uint arg);
uint ReturnSomething();
uint SomeProperty { get ; set ; }
uint this[int arg]
int this[uint arg]

While I could invent something quickly, I would like to ask people who have hit 
this problem and solved it in an acceptable way about their point of view. I 
would not care that much about performance; I think that convenience would be 
more important.

Best regards,

Marek

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
Some .NET courses you may be interested in:

Essential .NET: building applications and components with C#
November 29 - December 3, in Los Angeles
http://www.develop.com/courses/edotnet

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to