Skip to content

Instantly share code, notes, and snippets.

class TestClass : ConsoleApplication1.ITestClass
{
//dynamic fooLambda = () => { return "foo"};
//dynamic fooAnonDelegate = delegate() { return "foo" };
//Those don't work "Cannot convert lambda to 'dynamic' because it
//is not a delegate type
public TakeSomeFoo TakeSome = () =>{ return "foo"; };
public delegate string TakeSomeFoo();
public string fooBar { get; set; }
class TestClass : ConsoleApplication1.ITestClass
{
//dynamic fooLambda = () => { return "foo"};
//dynamic fooAnonDelegate = delegate() { return "foo" };
//Those don't work "Cannot convert lambda to 'dynamic' because it
//is not a delegate type
public TakeSomeFoo TakeSome = () =>{ return "foo"; };
public delegate string TakeSomeFoo();
public string fooBar { get; set; }
public class New
{
private iFoo _Foo;
public string PropertyName { get; set; }
public string PropertyValue { get; set; }
public New(iFoo foo) : this(foo, string.Empty){}
public New(iFoo foo, string propertyName) : this(foo, propertyName, string.Empty) { }
public New(iFoo foo,string propertyName, string propertyValue)
// Before and after refactoring
//
// Before
//
function showMessage(result)
{
if (result == Success ) {
$('#Success').show();
using System;
using System.Collections.Generic;
using System.Linq;
namespace CodeSamplesForArena.net
{
class Program
{
static void Main(string[] args)
{
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace CodeSamplesForArena.net
{
class Program
{
namespace Company.Internal.FunctionalTests.PPM.Selenium.GanttTests
{
[TestClass]
public class GanttChartTests
{
[TestMethod]
public void should_load_with_no_tasks_except_the_default_blank_task()
{
var ganttChart = GanttTest.NewTest
# == About camping.rb
#
# Camping comes with two versions of its source code. The code contained in
# lib/camping.rb is compressed, stripped of whitespace, using compact algorithms
# to keep it tight. The unspoken rule is that camping.rb should be flowed with
# no more than 80 characters per line and must not exceed four kilobytes.
#
# On the other hand, lib/camping-unabridged.rb contains the same code, laid out
# nicely with piles of documentation everywhere. This documentation is entirely
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Let Me Bing That For You</title>
<style type="text/css">
body {
font-family:Arial,Helvetica,Sans-Serif;
font-size:small;
var foo = {
buttonHandler: function(e) {
if(foo.AjaxState == "Executing") {
foo.AjaxSuccessCallback = function() {foo.buttonHandler.call(e);};
} else {
//button handler code goes here
}
},
MakeAjaxCall: function() {
foo.AjaxState = "Executing";