Library code snippets tagged with c#
-
Databinding SqlTypes
by Dan Glass
Demonstrates how Databind the SqlTypes using the PropertyDescriptor class and the ITypedList Interface.
-
Using the NotifyIcon control
by Colin Harman MACITP
This short article describes how to use the NotifyIcon in your applications and how to add menus to the icon.
-
String Manipulation in C#
by Colin Harman MACITP
The code provided shows how to trim, find, search, replace and split strings
-
Create Controls At Runtime
by Colin Harman MACITP
Shows how to create controls at runtime and set their properties
-
Data Entry Validation with Error Provider
by Colin Harman MACITP
This example code uses the errorProvider control which ships with c# to validate data entry and shows the error icon if validation is not correct
-
Listing Files & Folders in a directory
by Colin Harman MACITP
Retrieves all files and folders within a specified folder location, along with the file size and extension.
-
How to delete records with SqlCommand
by Edward Tanguay
This code shows you how to delete records with an SQL statement and get the number of records deleted returned back as an integer.
-
Placing results from DataReader into an Array
by Edward Tanguay
Since a connection cannot be used until a DataReader has been closed, it is quite often necessary to read the results of a DataReader into an array, then close the DataReader, then you can process the data in the array while you use the connection for something else. This shows you how.
-
A Chat Client/Server Program for C#
by Michael H
Source code for a chat server, and the accompanying client program.
-
FTP client library for C#
by Dan Glass
An FTP client library for C#, including asynchronous operation
-
C# WebCam Service with FTP and Installer
by Dan Glass
A C# WebCam Windows Service demonstrating FTP upload, Windows Service Installer, and file rotation.
-
A shell for Google's image search
by Michael H
A program that searches on Google's Image Search.
-
How to check to make sure a URL is valid
by Edward Tanguay
A neat bit of code that checks if a domain is valid and actually exists.
-
Image to HTML
by Michael H
A simple program that converts images into blocks of font tag colored 1s and 0s.
-
An AutoRedraw Property
by Michael H
A simple AutoRedraw property to fool around with.
-
How to measure how long a task takes
by Edward Tanguay
If you want to compare the performance of two processes, you can use this code to measure and print out the time takes by each process
-
How to display a date in a specific language
by Edward Tanguay
How to convert a date and display it in the correct format for a given language.
-
Convert an array to a comma-delimited string
by Edward Tanguay
How to convert an array into a comma-delimited string with String.Join
-
A convenient wrapper class to get file info
by Edward Tanguay
A simple wrapper class to combine the information contained in the .NET File and FileInfo classes.
-
System Menu Items
by Michael H
How to add menu's to the system menu and respond to clicks.