Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,4 @@ $RECYCLE.BIN/

# Mac crap
.DS_Store
/.vs/csharp-koans/v16
7 changes: 4 additions & 3 deletions TheKoans/AboutMethods.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace TheKoans
Expand Down Expand Up @@ -51,7 +52,7 @@ public void ExtensionMethodsWithParameters()
[TestMethod]
public void ExtensionMethodsWithVariableParameters()
{
CollectionAssert.AreEqual(FILL_ME_IN, this.MethodWithVariableArguments("Cory", "Will", "Corey"));
CollectionAssert.AreEqual(FILL_ME_IN2, this.MethodWithVariableArguments("Cory", "Will", "Corey"));
}

//Extension methods can extend any class my referencing
Expand All @@ -75,7 +76,7 @@ private string[] LocalMethodWithVariableParameters(params string[] names)
[TestMethod]
public void LocalMethodsWithVariableParams()
{
CollectionAssert.AreEqual(FILL_ME_IN, this.LocalMethodWithVariableParameters("Cory", "Will", "Corey"));
CollectionAssert.AreEqual(FILL_ME_IN2, this.LocalMethodWithVariableParameters("Cory", "Will", "Corey"));
}

//Note how we called the method by saying "this.LocalMethodWithVariableParameters"
Expand All @@ -84,7 +85,7 @@ public void LocalMethodsWithVariableParams()
[TestMethod]
public void LocalMethodsWithoutExplicitReceiver()
{
CollectionAssert.AreEqual(FILL_ME_IN, LocalMethodWithVariableParameters("Cory", "Will", "Corey"));
CollectionAssert.AreEqual(FILL_ME_IN2, LocalMethodWithVariableParameters("Cory", "Will", "Corey"));
}

//But it is required for Extension Methods, since it needs
Expand Down
3 changes: 2 additions & 1 deletion TheKoans/KoanHelper.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using System;

using System.Collections;

namespace TheKoans
{
public class KoanHelper
{
public static object FILL_ME_IN = new Object();
public static ICollection FILL_ME_IN2 = new ArrayList();
}

//This is just used when we need a type
Expand Down