New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of Function
C#
//without using Object Initializer Syntax
 
                    letter = new Letter();
                    letter.Date = DateTime.Now.Date;
                    letter.RegisterDate = DateTime.Now.Date;
                    letter.LetterType = LetterType.Outgoing;
 
                    letter.LetterInformation = new LetterInformation();
                    letter.LetterInformation.RuntimeState = common.RuntimeState.Added;
                    letter.LetterInformation.Letter = letter;
by afsharm   January 19, 2010 @ 4:17am
118 Views
1 comments
 
param ([string] $filename)
 
function splitString([string]$string, [int]$length)
{
    $lines = @();
    $stringLength = $string.Length;
    $position = 0;
 
    while ($position -lt $stringLength)
    {
by David R. Longnecker   October 13, 2009 @ 11:00am
301 Views
no comments
 
function truncate-string([string]$value, [int]$length)
{
    if ($value.Length -gt $length) { $value.Substring(0, $length) }
    else { $value }
}
by David R. Longnecker   August 25, 2009 @ 7:34am
508 Views
no comments
 
C#
using System;
using System.Security.Cryptography;
using System.Text;
using System.Web;
 
public static string HashedString(string cleanString, string salt)
{
    if (String.IsNullOrEmpty(cleanString)) { return String.Empty; }
 
    //Bytes to hash
by tomy ismail   July 15, 2009 @ 10:32pm
96 Views
no comments
 
C#
using System.Security.Cryptography;
using System.Text;
using System.Web;
 
public static string SHA256Encrypt(string source, int digitRandom)
{
    string outputHash = String.Empty;
 
    try
    {
by tomy ismail   July 15, 2009 @ 10:29pm
92 Views
no comments
 
brought to you by:
West Wind Techologies


If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate