Verify Numeric Value

  int Value = 0; bool ValueIsNumeric = int.TryParse(MyStringValue, out Value); For larger values: UInt64 i = 0; ValueIsNumeric = UInt64.TryParse(MyStringValue, out Value); Verifying a form TextBox value example //***************************************************** //***************************************************** //*********** VERIFY NUMBERIC TEXT BOX VALUE ********** //***************************************************** //***************************************************** private void VerifyTextBoxNumericValue(ref TextBox TextBox1, int MinValue, int MaxValue, int DefaultValue) { try { int […]

Read More

Using Strings-Values

ToString() https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-numeric-format-strings Display Values With Decimal Places Force display of value with fixed number of decimal places When formatting numbers you can use “0” as mandatory place and “#” as optional place. Display Decimal Value Display Decimal Places Display Hex Value Display Binary Value Display Software Version Typical Solution Display DateTime Link to all format […]

Read More

Encode/Decode Strings

HtmlEncode Enabling HttpUtility for projects By default your app probably can't see "System.Web.HttpUtility".  You need to include a reference to System.Web. Right-click your project in the Solution Explorer > Add Reference > Assemblies > Framework > Scroll to System.Web and enable it  

Read More