ushort math

G

Guest

how do I do this, what is the easy way to check the version for the prime
number 401? Any help are appreciated.

I get this error " Operator '>' cannot be applied to operands of type
'ushort[]" and 'int' ..."
VERSION version = ((VERSION)Marshal.PtrToStructure(buffptr,typeof(VERSION)));
if (version.VersionNumber > 401)
{
.....
}

the struct for VERSION is:
[StructLayout(LayoutKind.Sequential)]
public struct VERSION
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst=32)]
public char[] VendorID;
[MarshalAs(UnmanagedType.ByValArray, SizeConst=32)]
public ushort[] VersionNumber;
[MarshalAs(UnmanagedType.ByValArray, SizeConst=32)]
public char[] VersionTimestamp;
}
 
N

Nick Malik [Microsoft]

you are comparing against an array. How can an array be greater than
something?


--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top