Solving development problems  |  About this blog

Archive for the ‘programming’ tag

Check if string is valid number in C#

Just use this function and relax (taken from Scott Hanselman’s Blog) :-)

public static bool IsNumeric(object expression)
{
  if (expression == null)
    return false;

    double number;
    return Double.TryParse(Convert.ToString(expression, CultureInfo.InvariantCulture),
          System.Globalization.NumberStyles.Any, NumberFormatInfo.InvariantInfo,
          out number);
}

Written by Avivo

September 28th, 2010 at 2:06 pm

C# for Android phones

Novell (Mono/C#) is developing MonoDroid

This is really big for current .Net developers, Novell is working to bring C# to Android. Recently they brought C# to the iPhone in the form of MonoTouch. This will make it easier for developers to make cross platform apps as well as bring some of the existing apps that are made using MonoTouch to Android.

MonoDroid will give Android developers tools for binding the Java APIs, while making them accessible through the JIT-compiled, 335-powered runtime engine. This will hopefully allow allow developers to reuse their engine and business logic code across all mobile platforms and swapping out the user interface code for a platform-specific API. MonoTouch for iPhone devices and the Monodroid APIs for Android devices. If this works out the gap between Android and Iphone apps will continue to get smaller and Android app quality should also improve.

Written by Avivo

April 30th, 2010 at 8:25 am