This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Program: | |
class Program | |
{ | |
string myString; | |
private Program() | |
{ | |
myString = "foo"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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> |