Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pass numeric to COMDLL
Message
From
25/02/2004 10:32:27
 
 
To
25/02/2004 10:14:12
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00880251
Message ID:
00880711
Views:
17
Hi Dave,

Great minds think alike <g> ... but *I* beat *you* to the reply this time. =)

~~Bonnie

>John,
>
>>Error: Cannot implicitly convert type 'object' to 'decimal'
>
>My syntax might not be right and I might be misunderstanding "casting" (I'm not a C# expert), but can you force a conversion to decimal in the return statement... something like this?
>
>return (decimal)b.getbalance(custNumber);
>
>Or perhaps store the return value to a var first that is forced to decimal, then return that?
>
>decimal retvalue = (decimal)b.getbalance(custNumber);
>return retvalue;
>
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform