|
A collection of powerful and useful code snippets written in C# for .NET developers. Source code is submitted by Visual C# Kicks and website readers. We encourage you to submit your own code and rate other people's submittions. |
All C# Code Snippets are under the Visual C# Kicks license agreement
Submit a Code Snippet
Delete Self Allows a standalone program to delete itself.
Shuffle Lists and Arrays An in-place algorithm to randomly shuffle a list or array in C#
C# Distance Formula A simple implementation of the distance formula in C#
Data to CSV Write a DataTable or a DataView to a CSV file
C# Fraction Structure A C# struct to represent decimal numbers as fractions.
C# Combination Function A simple function to calculate the number of possible combinations.
Degrees To Point and Back Convert an angle in degrees into an XY-coordinate point and back.
Temporary File C# Class Easily handle temporary file management in C#
Taking Screenshots with C# Using API calls in C# to capture an image of the monitor screen.
Multilevel Hierarchy - Class Interface An example of a multilevel hierarchy using class interfaces
Sort Strings by Length Sort a collection of strings by their length, from shortest to longest.
C# Encryption Class Class to easily encrypt strings and other types of data.
Linq Objects New Querying linq objects
RNGCryptoServiceProvider Random Integer Generate a random integer in a range using the RNGCryptoServiceProvider class.
C# Factorial Calculate the factorial value of a number in C#.NET
PHP Time Returns time represented in the same way as the PHP time() function.
Submit a Code Snippet