Re: To determine whether the input is a string or INT?



saturnlee@xxxxxxxxx wrote:
....
Is there any function to determine whether the input is a string or
number?

'try' it. E.G.

try {
int number = Integer.parseInt(input);
catch (NumberFormatException nfe) {
// don't bother dumping the trace, this is a string
parseInput( input );
}

HTH

Andrew T.

.



Relevant Pages

  • How to use Log4net TelnetAppender and Trace Listeners
    ... Is there a way to use Log4net and Trace Listeners? ... public static void Initialize(string traceListeners, ... public static void Flush2File(string file, string msg, bool ...
    (microsoft.public.dotnet.framework)
  • Re: How to look at parameter string
    ... I am tracing, but the problem I can't trace (at least, I haven't figured out ... string it is putting together to send to Sql. ... >> The problem is not coming from Sql Server but from my page. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Dataset not Clearing
    ... Try to trace the dataSet content after clearing it in release mode. ... My connection string says to use the headers from the 1st row, ... t> foreach (string strFile in strFiles) ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Dataset not Clearing
    ... Try to trace the dataSet content after clearing it in release mode. ... My connection string says to use the headers from the 1st row, ... t> foreach (string strFile in strFiles) ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: substring() not working?
    ... java.net.URL" but there's no way to parse the query string. ... Here is test output with trace of the data you submitted in you message: ... Queued 13 LastName Bush ... Queued 10 Country US ...
    (comp.lang.java.programmer)