0
命名空間或類型的列表這是我的代碼:如何更換使用正則表達式
string _type="System.Collections.Generic.List<PhilpostDB.ViewModel.Person>";
_type = Regex.Replace(_type, @"[.\w]+\.(\w+)", "$1"); // this result=List<Person>
我想結果:_type = PhilpostDB.ViewModel.Person
感謝@tim但是如果我想導致= PhilpostDB.ViewModel.Person –