Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pass numeric to COMDLL
Message
From
25/02/2004 10:14:12
 
 
To
25/02/2004 09:45:13
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00880251
Message ID:
00880704
Views:
16
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;
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform