Re: Using ToString to pad an integer with leading zeroes



On Jun 27, 12:50 pm, stainless <Mark.Wingfi...@xxxxxxxxx> wrote:
You will have to excuse my inexperience with C# but I cannot get the
ToString("D9") to work when debugging. The message returned is

No overload for method 'ToString' takes '1' arguments

Should I have defined something earlier in my C# to allow the "D9" as
an argument for this method?

What are you calling ToString() on?

If you're writing code in the debugger's immediate window, you may
well find it easier to write a very small test application instead (I
almost always use a console app). That way you're isolated from any
differences between the debugger and "normal" code.

Jon

.



Relevant Pages

  • Re: Using ToString to pad an integer with leading zeroes
    ... ToStringto work when debugging. ... What are you calling ToString() on? ... If you're writing code in the debugger's immediate window, ... non integral type. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Thinking about an unbound data entry form...
    ... Debugging, and writing ... > writing code, table design... ... > How logical of Access to think I want to show the form I'm opening! ... open the main form or the data entry/fixup form. ...
    (microsoft.public.access.forms)
  • Re: Thinking about an unbound data entry form...
    ... Debugging during development is one ... Debugging, and writing code. ... Three of my weaknesses are debugging, writing code, table ... How logical of Access to think I want to show the form I'm opening! ...
    (microsoft.public.access.forms)
  • Re: c# interview question
    ... uses the ToString() method anyway. ... between the two would have been optimized away by the compiler, ... If you're writing code where these differences are ... significant, use C or C++, or even Assembly language. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: ToString Debug vs Display strategies & preferences
    ... IFormattable implementation as well as ToString() override. ... public string FirstName ... public string ToString(string fmt, IFormatProvider fp) ... How about generalized debugging ToString stratagies? ...
    (microsoft.public.dotnet.languages.csharp)

Quantcast