Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

System.Decimal.multiply error in VB


  • Please log in to reply
1 reply to this topic

#1 Alonzo67

Alonzo67

    New Member

  • Members
  • Pip
  • 1 posts

Posted 02 January 2012 - 03:15 PM

I converted a C# program to VB. This program works very well in C# under NETMF, but in VB i have an error.

Requested operation is not available because the runtime library function ' System.Decimal.multiply' is not defined

Why ? Is Ulong type not supported in VB.
Thank you for your help.


Dim offsetTransmitTime As Byte = 40
Dim intpart As ULong = 0
Dim fractpart As ULong = 0
For i As Integer = 0 To 3
intpart = (intpart << 8) Or ntpData(offsetTransmitTime + i)
Next
For i As Integer = 4 To 7
fractpart = (fractpart << 8) Or ntpData(offsetTransmitTime + i)
Next
Dim milliseconds As ULong
milliseconds = (intpart * 1000 + (fractpart * 1000) / &H100000000L)

s.Close()
Dim dateTime As DateTime = New DateTime(1900, 1, 1) + TimeSpan.FromTicks(CLng(milliseconds) * TimeSpan.TicksPerMillisecond)
Utility.SetLocalTime(dateTime.AddMinutes(GmtOffset))

#2 martin2250

martin2250

    Advanced Member

  • Members
  • PipPipPip
  • 37 posts
  • LocationGermany

Posted 11 February 2013 - 08:30 PM

i had the same problem using C#, it shouldn't be vb related

we probably both forgot to add a reference






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.