S
sjoshi
Hello
I have a class that worked in 1.1 but fails now on 2.0 on same data.
Any ideas are appreciated.
public class TSFormatter: IFormatProvider, ICustomFormatter
{
#region IFormatProvider Members
public object GetFormat(Type format)
{
return this;
}
#endregion
#region ICustomFormatter Members
public string Format(string format, object arg, IFormatProvider
formatProvider)
{
return BitConverter.ToInt64(((byte[])arg), 0).ToString(); //** Fails
here ***
//Message="Unable to cast object of type 'System.Int32' to
type 'System.Byte[]'."
}
#endregion
}
thanks
Sunit
I have a class that worked in 1.1 but fails now on 2.0 on same data.
Any ideas are appreciated.
public class TSFormatter: IFormatProvider, ICustomFormatter
{
#region IFormatProvider Members
public object GetFormat(Type format)
{
return this;
}
#endregion
#region ICustomFormatter Members
public string Format(string format, object arg, IFormatProvider
formatProvider)
{
return BitConverter.ToInt64(((byte[])arg), 0).ToString(); //** Fails
here ***
//Message="Unable to cast object of type 'System.Int32' to
type 'System.Byte[]'."
}
#endregion
}
thanks
Sunit