> 1) Where can I find the valid set of formatting codes that can be
> used with the tostring method?
In the .Net Framework docs. (Working with base types -> Formatting types ->
Numeric Format Strings)
> 2) When using the following statement I get an invalid cast error
> --- why? X0SS = drResult("X0SS").tostring("f2")
> where drResult is a datarow and the value of drResult("X0SS") is
> 2.75 a double.
Maybe because X0SS is not declared as a string.
> If I change it to the following then no error occurs:
> X0SS = cDbl(drResult("X0SS")).tostring("f2")
What is the type of X0SS?
Armin
Darrell Wesley - 01 Oct 2007 20:29 GMT
X0SS was originally defined as type object I have changed it to type String
but the error remained. The error message said something about not being able
to convert type string to integer??
> > 1) Where can I find the valid set of formatting codes that can be
> > used with the tostring method?
[quoted text clipped - 15 lines]
>
> Armin
Armin Zingler - 01 Oct 2007 22:38 GMT
> X0SS was originally defined as type object I have changed it to type
> String but the error remained. The error message said something
[quoted text clipped - 17 lines]
> >
> > What is the type of X0SS?
Did you enable Option Strict? If not, do it and solve all compile errors.
Armin