Specify System.UInt64 values

  • Thread starter Thread starter John Smith
  • Start date Start date
J

John Smith

Hello

Whenever I try to set a value of a System.UInt64 I get:

Dim var1 As System.UInt64 = &H18B377544DD23334

Error BC30311: Value of type 'Long' cannot be converted to 'System.UInt64'.

What is the correct way?

Thanks in advance.
-- John
 
John Smith said:
Whenever I try to set a value of a System.UInt64 I get:

Dim var1 As System.UInt64 = &H18B377544DD23334

Error BC30311: Value of type 'Long' cannot be converted to
'System.UInt64'.

What is the correct way?

VB.NET doesn't provide support for unsigned integer data types in the
language. You may want to use 'UInt64.Parse' to get an 'UInt64' from a
string.
 
VB.NET doesn't provide support for unsigned integer data types in the
language. You may want to use 'UInt64.Parse' to get an 'UInt64' from a
string.
Damn! Strings are not really apropriate for what I need. Basicly I'm
developing a wrapper for a DLL written in C.
The values are just suppose to be transfered to the DLL which will take care
of the rest. The 64 bit values I have are auto generated by a utility and
are used in function calls such as:

obj.Func(handle, 64bit_value,...)

Are there no alternatives so I can write the data as values?
C/C++ Has a powerful preprocessor which allows you to write useful macros
but I assume the .NET preprocessor is quite useless.

Thanks in advance.
-- John
 
Back
Top