Im working on a system that allows one to define data types (types that have only public properties) on the fly (undercovers using reflection.emit), i want my new types to also be CLS compliant, what would a validat开发者_StackOverflow社区or that validates member names need to take into account in order to be CLS compliant, im only interested in what a function would validate in order to determine if the entered name is ok..
something like
bool IsValidMemberName(string name)
{
...
}
Have a look here for the rules: Why is this name with an underscore not CLS Compliant?. Now you simply need to build a regex that checks for those rules. Shouldn't be too hard.
精彩评论