Skip to content

Instantly share code, notes, and snippets.

View bezzad's full-sized avatar
:octocat:
Hi

Behzad Khosravifar bezzad

:octocat:
Hi
View GitHub Profile
@bezzad
bezzad / NumericTextBox.cs
Last active August 30, 2016 08:08
C#.Net Numeric TextBox by thousand separator like: 123,456,789
public class NumericTextBox : TextBox
{
private const char Delete = (char)8;
private const char Backspace = '\b';
public bool IsNumeric { get; set; } = false;
public new string Text
{
get { return IsNumeric ? base.Text?.Replace(",", "") : base.Text; }
@bezzad
bezzad / VersionUpdater.tt
Created July 18, 2016 13:06
Auto .net project version updater by TextTemplete (.tt)
<#@ template language="C#" hostspecific="true" #>
<#@ import namespace="System.IO" #>
<#@ import namespace="System.Text.RegularExpressions" #>
<#@ output extension=".txt" #>
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//