How do you determine whether a string represents a numeric value?



How do you determine whether a string represents a numeric value?..

Answer / Sumit Rajput

In C#, you can use the TryParse method to check if a string can be converted into a specific numeric type. For example: `decimal num; if(Decimal.TryParse("123", out num)) {n // the string represents a decimal numbern}"

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What is Fragmentation and its Types?

1 Answers   MCN Solutions,


C# Code for How to set readonly property to Id(database) value?

2 Answers   HCL,


Why do we need singleton pattern in c#?

1 Answers  


Is c++ or c# better?

1 Answers  


Define property in c#.net?

1 Answers  


Why is c# better than java?

1 Answers  


What is difference between array and arraylist c#?

1 Answers  


What is tryparse?

1 Answers  


What is the execution entry point for a c# console application?

1 Answers  


What are c# i/o classes? What are the commonly used i/o classes?

1 Answers  


What statements can enclose a "continue" statement?

3 Answers   Fortech,


1. What is IIS. pl explain practically. 2. Difference b/w webserver and application server. pl explain practically.

1 Answers  


Categories