Welcome To Snipplr


Everyone's Recent C# Snippets



1 ... 8 9 10 11 12 ... 16
1 1640 posted 15 years ago by emmanuelbuah
Como convertir tiempo a formato de 24 horas y viceversa.
2 2908 posted 15 years ago by derebus
2 1484 posted 15 years ago by stewshack
using System.Drawing; using System.Drawing.Imaging;
1 1280 posted 15 years ago by rlynch3
Extension methods for making strings HTML safe.
2 1608 posted 15 years ago by SuprDewd
For those having trouble with encoding and decoding bencode, here is something to help you.
3 3164 posted 15 years ago by SuprDewd
1 3983 posted 15 years ago by acosonic
Well, there is many faulty C# timestamp handling codes. Here is a proper one, use UtcNow instead Now if you need UTC timestamp...
1 1755 posted 15 years ago by acosonic
1 1698 posted 15 years ago by mpcircuitry
I removed several properties from my custom Profile class, and wanted to clean out the data from the aspnet\_Profile table. This code will remove all unwanted data from the PropertyNames and PropertyValuesString columns of aspnet\_Profile. Note this...
2 1817 posted 15 years ago by mmfusion
3 3371 posted 15 years ago by ax4413
You can convert a string to hex or vice-versa with this methods. Example for real world; You want set / get some data from URL, but if your data has some special chars (like ^$ %) it'll be problem... In this case, you can use this methods and conve...
2 3318 posted 15 years ago by emregulcan
0 1647 posted 15 years ago by mracoker
This is a simple Linq query against a list of Star Wars characters.
1 1367 posted 15 years ago by stewshack
If you want to serialize a password in some custom object you are working with, create another member that is the encrypted bytes and serialize/deserialize that. For simply encrypting/decrypting a file, you can use [System.IO.File.Encrypt](http://...
0 1586 posted 15 years ago by pckujawa
1 1469 posted 16 years ago by imstand
This code will take a start and end string and then search for them within the subject string. It returns what is between the start and end strings. As an example, if I had the following text... Some test text string, with a start <tag> and an end...
0 1847 posted 16 years ago by blackf0rk
This code will execute a postback.
0 1217 posted 16 years ago by blackf0rk
Using GCheckout.dll Join("") is an IEnumerable<string> extension I wrote (to concatenate strings with a separator) Base64Decode() is a string extension I wrote (decode base64) Configuration.Google[Test]Merchant{Id|Key} are just some static var...
0 1346 posted 16 years ago by hitsthings
.net 2.0+ Generic classes make code size much smaller and casting objects (boxing) a cinch. However, currently there are some unsupported IDE options when trying to cast objects to and from generic objects that use mixed object types (inherited from...
0 1783 posted 16 years ago by bryanlyman
I love creating simple little extension methods like these to improve code readability.
1 1702 posted 16 years ago by mattcasto
I love creating simple little extension methods like this to make my code read more better.
0 1347 posted 16 years ago by mattcasto
For both gmail and gApps, use smtp.gmail.com on port 25 with SSL and NetworkCredentials. Neither can send email to their own address, but they can send to other addresses. [NLog](http://nlog-project.org/) has [an example](http://nlog-project.or...
1 1992 posted 16 years ago by pckujawa
`w_Dgv` is the name of the DataGridView control.
0 2307 posted 16 years ago by pckujawa
0 1591 posted 16 years ago by mkurdziel
You can get all countries list by this method. Also you can find some details for countries like; - original name, - three letter ISO region name, - three letter WINDOWS region name, - currency symbol etc..
1 1883 posted 16 years ago by emregulcan
1 ... 8 9 10 11 12 ... 16