Link to home
Start Free TrialLog in
Avatar of Nugs
Nugs

asked on

Vb.Net to C# conversion (cont.)

Morning guys,

Well my last few posts have been regarding VB.Net to C# conversion. I have used Instant C# from Tangible Software Solutions. Very nice program but it does miss on a few things.

So I have a few things below I was hoping I could get some better accurate conversion from someone.

The app took this:
---------------------------------------------------------------------------------------------------------------
VB: .. & FormatCurrency(calculatedTotalValue, 2)

And converted it to this:
C#: & Microsoft.VisualBasic.Strings.FormatCurrency(calculatedTotalValue, 2, Microsoft.VisualBasic.TriState.UseDefault, Microsoft.VisualBasic.TriState.UseDefault, Microsoft.VisualBasic.TriState.UseDefault)
---------------------------------------------------------------------------------------------------------------

Also how would I format this into a currency in C#?
---------------------------------------------------------------------------------------------------------------
<%# FormatCurrency(Container.DataItem) %>
---------------------------------------------------------------------------------------------------------------

Thanks guys

Nugs
SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PHD
PHD

<%# Container.DataItem.ToString("{0:c}") %>
Avatar of Nugs

ASKER

Neither of these worked...
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Nugs

ASKER

<%# Container.DataItem.ToString("c") %>

No overload for method 'ToString' takes '1' arguments      
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial