Created
May 28, 2012 13:20
-
-
Save hatelove/2819125 to your computer and use it in GitHub Desktop.
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
internal class Program | |
{ | |
private static void Main(string[] args) | |
{ | |
IList<CellPhone> o = new CellPhones(); | |
o.Add(new CellPhone()); | |
Console.WriteLine("item count:{0}", o.Count.ToString()); | |
} | |
} | |
[Serializable] | |
public class CellPhone | |
{ | |
public string CountryCode { get; set; } | |
public string Phone { get; set; } | |
private string _FullCellPhone; | |
public string FullCellPhone | |
{ | |
get | |
{ | |
_FullCellPhone = CountryCode + Phone; | |
return _FullCellPhone; | |
} | |
} | |
} | |
[Serializable] | |
public class CellPhones : List<CellPhone>, IList<CellPhone> | |
{ | |
public new void Add(CellPhone item) | |
{ | |
Console.WriteLine("test"); | |
base.Add(item); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment