Welcome To Snipplr
Everyone's Recent C# Snippets Tagged c#
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
ASCIIEncoding class has another method, GetByte(), which does the opposite of this one.
1
757
posted 12 years ago by roboninjapiratejesus
C#
TruncateOnWordBoundary - a useful extension method for cutting a string short, but not in the middle of a word.
Ever wanted a method that can truncate a string, but only on a word boundary? This method works like Substring() but doesn't snip a string in the middle of a word, i.e. it only truncates the string on a word boundary. Useful for producing a summary f...
1
1016
posted 12 years ago by stewartrae
Not that theres anything new to this. In fact its very old fashioned, but If you like me forget how its done; snip it.
0
674
posted 13 years ago by fengelz
use this if you want to make a binary use an older version of a dependent binery
1
541
posted 13 years ago by samwa
The only way i know to create a normal "fire property changed" method that is still efficient yet strongly typed. The other common pattern uses run time checking and uses the TyepDescriptor for the current type to check for property existence - a muc...
0
427
posted 13 years ago by nimast
I use these helper methods to create a jQuery based date text box with appropriate short date formatting.
0
575
posted 13 years ago by nkirkes
Not extensively tested, but seems to work in my sample project.
uses the class I posted here:
http://www.snipplr.com/view/46669/minimist-c-errorlogging-class/
1
1105
posted 13 years ago by kyrathaba
C#
Simplified and Consistent Printing in Silverlight - with Page Margins, Shrink to Fit, and Landscape printing
The following extension method allows you to call Print() on any FrameworkElement, UIElement or group of elements, and print with a variety of settings such as landscape mode, shrink to fit, page centering, and more
0
761
posted 13 years ago by alishahnovin