Basic list of Visual Studio snippets that I use day-to-day. Most snippets follow a predictable pattern for a data type and nullable data type, and others with access modifiers.
Code | Result |
---|---|
pb | public bool |
pbn | public bool? |
pbg | public bool |
pdt | public DateTime |
pdtn | public DateTime? |
pdtg | public DateTime |
pd | public decimal |
pdn | public decimal? |
pdg | public decimal |
pie | public IEnumerable$T$ |
pies | public IEnumerable$SelectListItem$ |
pi | public int |
pin | public int? |
pig | public int |
plist | public List$T$ |
ps | public string |
psg | public string |
sn | string.IsNullOrWhiteSpace( |
pid | public int Id { get; set; } |
pname | public string Name { get; set; } |
pdesc | public string Description { get; set; } |
I typically place these in <VS-Installation-Folder>\VC#\Snippets\1033\Custom and import them into Visual Studio (Tools -> Code Snippet Manager -> Import)