Welcome To Snipplr
Everyone's Recent C# Snippets
- All /
 - JavaScript /
 - HTML /
 - PHP /
 - CSS /
 - Ruby /
 - Objective C
 
Shows an example of what a closure is.   
Result: Counter=1    Counter= 2
        
        
        
            1 
        
        
            1139 
        
                    posted 12 years ago by venu1729
            this program view some of  OS information try it you will not lose thing.
        
        
        
            1 
        
        
            1080 
        
                    posted 12 years ago by PalCoder
            A function to check the first two bytes to see if they match "MZ" marking it as an executable.
        
        
        
            1 
        
        
            4315 
        
                    posted 12 years ago by jprochazka
            This example is for an  inline table value function with one string parameter
t1 is of type YourDataContext and t2 is of type string(hence the name of the mole method)
        
        
        
            0 
        
        
            2820 
        
                    posted 12 years ago by kirstencris
            Draw a border around the form.
Add to the paint event handler.
        
        
        
            0 
        
        
            1532 
        
                    posted 12 years ago by thomas-h
            Ektron smartform data contains a xml nodelist which I put in a data table and parse out into an html table
        
        
        
            0 
        
        
            2561 
        
                    posted 12 years ago by dego89
            The following code retrieves a list of content based on a taxonomy id. The list is bound to a repeater that display a preview of the content with a quick link to a content page. The content comes in based on the previous taxonomy id but exposes a con...
        
        
        
            0 
        
        
            2405 
        
                    posted 12 years ago by dego89
            To use a different class for alternating item of asp.net repeater control
        
        
        
            0 
        
        
            1170 
        
                    posted 12 years ago by samilce
            The apple business is probable among the most well-known businesses at this moment within the matter from the extremely well best devices. Apple mackintosh produces numerous judgements for cutting-edge together with groundbreaking gizmos. The whole A...
        
        
        
            0 
        
        
            1337 
        
                    posted 12 years ago by jessicabutlerjcm
            Two static dictionaries for converting US state names to abbreviations, and the reverse.
        
        
        
            0 
        
        
            4124 
        
                    posted 12 years ago by misholson
            ต้à¸à¸‡à¸¡à¸µà¸à¸¢à¹ˆà¸²à¸‡à¸™à¹‰à¸à¸¢ 8 ตัวà¸à¸±à¸à¸©à¸£
ต้à¸à¸‡à¸¡à¸µà¸•ัวà¸à¸±à¸à¸©à¸£à¸à¸±à¸‡à¸à¸¤à¸©à¸•ัวเล็ภ[a-z] à¹à¸¥à¸°à¸•ัวใหà¸à¹ˆ[A-Z] à¸à¸¢à¹ˆà¸²à¸‡à¸™à¹‰à¸à¸¢à¸à¸¢à¹ˆà¸²à¸‡à¸¥à¹ˆà¸°...
        
        
        
            0 
        
        
            2270 
        
                    posted 12 years ago by gaserland
            Keep the namespace name, class name, guid that VS automatically generates. Make sure all of the "using" inclusions included.
        
        
        
            0 
        
        
            1752 
        
                    posted 12 years ago by rumremix
            Simple Class Connection for use in C# Code.
Methods:
- ReturnDataTable(string strQueryCommand)
- ReturnDataSet(string strQueryCommand)
 
- ExecuteQuery(string strQueryCommand)
- ReturnDataReader(string strQueryCommand)
        
        
        
            1 
        
        
            2385 
        
                    posted 12 years ago by rodrigoallves
            Just a snippet I like; this can be called on GotFocus or LostFocus of a field, and it *attempts* to set the input language to the desired language.
        
        
        
            0 
        
        
            1119 
        
                    posted 12 years ago by Winkyboy
            Shows how to use WebClient class to retrieve HTML from an URL and then to use HtmlAgilityPack to parse it.
        
        
        
            1 
        
        
            2092 
        
                    posted 12 years ago by denakitan
            this handy function gets all child tabs for the tab id you pass in, only those that are meant to appear in the menu.
        
        
        
            0 
        
        
            1353 
        
                    posted 12 years ago by box86rowh
            Sort a file that contains integers between 1 and thousand. The output file should contain the entries like (n-times 1, followed by n-times 2 and so on): 1111222333555... But - you are not allowed to load all entries into memory at once. How to solve...
        
        
        
            0 
        
        
            1024 
        
                    posted 13 years ago by awsomedevsigner
            Examples of use of Enum type, like how to iterate its items.
        
        
        
            1 
        
        
            1367 
        
                    posted 13 years ago by denakitan
            Utility class that abstracts the creation of a Excel spreadsheet through Interop, and helps on adding and format its contents.
        
        
        
            1 
        
        
            2218 
        
                    posted 13 years ago by denakitan
            Example of the usage of Directory IO class and the parsing of strings to DateTime.
        
        
        
            1 
        
        
            1561 
        
                    posted 13 years ago by denakitan
            Snippet to illustrate how to bind a ComboBox to a Dictionary.
        
        
        
            0 
        
        
            1730 
        
                    posted 13 years ago by denakitan
            Also extended C# LINQ and Extension method (simple) to include the last (MAX) Date Created property, added a new Folder class (model) with properties and included them in a List<Folder>. Also, amended the LINQ statement to get the MAX(Date Created) .
        
        
        
            0 
        
        
            1274 
        
                    posted 13 years ago by ed_trench