Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

README.md

SmExtensionMethodsUtlity

C# extension methods Utlity
it contains bunch of nice utlity methods

How to use ?

        // try to convert '1234' into int 
        int i = "1234".toInt() ?? 0;
        Assert.AreEqual(i, 1234);
        i = "a1234".toInt() ?? 0;
        Assert.AreEqual(i, 0);
        // try to convert '0123' to decimal
        decimal d = "0123".toDecimal() ?? 0;
        Assert.AreEqual(d, 0123);<br>
        d = "0a123".toDecimal() ?? 1;
        Assert.AreEqual(d, 1);

About

C# extension methods Utility

Resources

Releases

No releases published

Languages

You can’t perform that action at this time.