Skip to content

Instantly share code, notes, and snippets.

View Ninputer's full-sized avatar

Fan Shi Ninputer

View GitHub Profile
@Ninputer
Ninputer / List.cs
Created November 2, 2012 11:28 — forked from JeffreyZhao/List.cs
// As we all know, the generic List<T> class in .NET doesn't
// have a RemoveMultiple method. Could you implement it for me?
// Say the elements are kept in the _items field, which is an
// array of type T. Also, use _count to keep the current number
// of elements.
// PS: You can compare two items with "==" operator.
namespace System.Collections.Generic
{
public class List<T>
@Ninputer
Ninputer / List 递归
Created July 30, 2012 10:20 — forked from anonymous/List 递归
递归创建List并填充值
List<string> CreateInstanVar(int time_in_level1)
{
List<string> result = new List<string>();
for (int i = 0; i < time_in_level1; i++)
{
result.Add(String.Empty);
}
return result;
}
@Ninputer
Ninputer / gist:2967888
Created June 21, 2012 19:12 — forked from anonymous/gist:2967637
.NET 4.5 Disassembly
Program:
class Program
{
string myString;
private Program()
{
myString = "foo";
}