CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching language of C#
C#
(Korrigieren sie mich, wenn meine Annahme über den aktuellen Stand nicht zutrifft)
Today @ 8:42am
Tags:
4 Views
no comments
 
C#
/// <summary>
/// This method does nothing, avoids compiler warnings.
/// </summary>
public static void Noop() {
   // alles fuer den hugo avoids compiler warnings
   int hugo = 1;
   hugo = hugo / 1;
}
 
Today @ 7:53am
Tags:
7 Views
no comments
 
C#
======================== 08-02-2012 =========================
  ------------- All Premium Accounts & cookies------------
======================== 08-02-2012 =========================
 
 
 
 
[4] Parts :
 
Part 1 : http://adf.ly/5ITNQ
Today @ 7:24am
Tags:
6 Views
no comments
 
C#
[TestMethod]
        public void NA_EC_012_002_Start_Workflow()
        {
            // get the procInstID from the draft created in step 001
            procInstID = UITestHelpers.GetProcInstIDFromWorkflowTitle(workflowTitle);
 
            // verify procInstID exists is NOT deleted and IS in draft
            bool isValid = UITestHelpers.VerifyProcessInstanceID(procInstID, false, false, WorkflowStep.Draft);
            Assert.IsTrue(isValid == true, "Workflow {0} does not exist or is not an active draft workflow.", procInstID);
Today @ 7:21am
Tags:
4 Views
no comments
 
C#
// Från: http://codekata.pragprog.com/2007/01/kata_four_data_.html
namespace CodeKatas
{
    using System;
 
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using System.Collections.Generic;
 
    using Moq;
by Olof Bjarnason   Today @ 3:58am
Tags:
12 Views
no comments
 
C#
// Från: http://codekata.pragprog.com/2007/01/kata_four_data_.html
namespace CodeKatas
{
    using System;
 
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using System.Collections.Generic;
 
    using Moq;
by Olof Bjarnason   Today @ 3:54am
Tags:
4 Views
no comments
 
C#
public T Get<T>(string key, Func<T> fallbackFunction, CacheItemPolicy cacheItemPolicy=null)
        {
            if (cacheItemPolicy == null)
            {
                cacheItemPolicy = new CacheItemPolicy
                                      {
                                          AbsoluteExpiration = ObjectCache.InfiniteAbsoluteExpiration,
                                          Priority = CacheItemPriority.NotRemovable
                                      };
            }
Yesterday @ 9:33pm
Tags:
7 Views
no comments
 
C#
public sealed class CacheManager : ICacheManager
    {
        private static readonly Lazy<CacheManager> lazy = new Lazy<CacheManager>(() => new CacheManager());
 
        public static CacheManager Instance { get { return lazy.Value; } }
 
        private CacheManager()
        {
            if (_cache == null)
            {
Yesterday @ 8:12pm
Tags:
7 Views
no comments
 
C#
public sealed class CacheManager
    {
        private static readonly Lazy<CacheManager> lazy = new Lazy<CacheManager>(() => new CacheManager());
 
        public static CacheManager Instance { get { return lazy.Value; } }
 
        private CacheManager()
        {
            if (_cache == null)
            {
Yesterday @ 8:00pm
Tags:
6 Views
no comments
 
C#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.IO;
Yesterday @ 12:45pm
Tags:
10 Views
no comments
 
C#
builder.Entity<User>()
    .HasMany(u => u.GrantedPermissions)
    .WithMany(p => p.GrantedTo)
    .Map(m =>
    {
        m.MapLeftKey("UserID");
        m.MapRightKey("PermissionMask");
        m.ToTable("GrantedPermissions");
    });
Yesterday @ 11:46am
Tags:
11 Views
no comments
 
C#
public double phi()
{
 
    ArrayList string1 = new ArrayList();
    Random rand = new Random();
    double ph11;
    int f1 = 0, f2 = 0, f3 = 0, f4 = 0, f5 = 0, f6 = 0, s1, s2, n3 = 0, n4 = 0;
    double n1 = 0, n5 = 0;
    double n;
    string str, a1;
Yesterday @ 9:44am
Tags:
11 Views
no comments
 
C#
public double po()
 {
     double k;
     double pooo = 0;
 
     double num = 0;
     k = 0;
     for (p1 = 0; p1 < 10; p1++)
         for (p2 = 0; p2 < 10; p2++)
             for (p3 = 0; p3 < 10; p3++)
Yesterday @ 9:42am
Tags:
11 Views
no comments
 
C#
class 
{
}
Monday @ 11:42pm
Tags:
11 Views
no comments
 
C#
private void PhoneApplicationPage_ManipulationDelta1(object sender, ManipulationDeltaEventArgs e)
{
    MyTransform1.X += e.DeltaManipulation.Translation.X;
    MyTransform1.Y += e.DeltaManipulation.Translation.Y;
    Collide();
}
 
private void PhoneApplicationPage_ManipulationDelta2(object sender, ManipulationDeltaEventArgs e)
{
    MyTransform2.X += e.DeltaManipulation.Translation.X;
by Jerry Nixon   Monday @ 9:37pm
Tags:
13 Views
no comments
 
C#
//Email regex validator
Regex regex = new Regex(@"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*");
 
//Website regex validator
Regex regex = new Regex(@"^http\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(/\S*)?$");
 
//Comments on forum regex validator (max 4000 characters)
Regex regex = new Regex(@"^[+_%@:,.'!?&quot;\\\^\&\#\$\*\(\)\-\/a-zA-Z0-9\s]{1,4000}$");
by Egli   Monday @ 9:34pm
11 Views
no comments
 
C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
namespace ClassLibrary1
{
    using Chronic;
 
    using NUnit.Framework;
Monday @ 12:53pm
Tags:
11 Views
no comments
 
C#
class Program {
 
    static event Action eventToHandle;
 
    static void Main(string[] args) {
 
        int scopeVariable = 5;
 
        Action callback = null;
        callback = () => {
Monday @ 11:03am
Tags:
8 Views
no comments
 
C#
protected override void RequestStartup(IKernel container, Nancy.Bootstrapper.IPipelines pipelines)
{
    pipelines.AfterRequest.AddItemToStartOfPipeline(
        x =>
            {
                if (x.Response.ContentType.Contains("text/html"))
                    x.Response.ContentType = "text/html; charset=utf-8";
            });
}
by couellet   Sunday @ 7:37am
Tags:
16 Views
no comments
 
C#
protected override void RequestStartup(IKernel container, Nancy.Bootstrapper.IPipelines pipelines)
{
    pipelines.AfterRequest.AddItemToStartOfPipeline(
        x =>
            {
                if (x.Response.ContentType.Contains("text/html"))
                    x.Response.ContentType = "text/html; charset=utf-8";
            });
}
Sunday @ 7:36am
Tags:
11 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