Created
April 6, 2012 08:04
-
-
Save ritalin/2318050 to your computer and use it in GitHub Desktop.
Limitted String for .NET
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Sample { | |
public static class LimittedStringExtensions { | |
public string LimmitedString(this string inSelf, int inMaxLen) { | |
if (inSelf.Length > inMaxLen) { | |
throw new Exception("長すぎwwwワロタwww"); | |
} | |
return inSelf; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment