base on c#.net