ArcPy has the function ValidateTableName to remove invalid characters.
Summary
Takes a table name and a workspace path and returns a valid table name for the workspace. An underscore "_" will replace any invalid character found in the table name and will honor the name restrictions for the workspace. The table name restrictions depend on the specific RDBMS used.
Is there a similar function to clean a table name for .NET?
Or is there a list of all invalid characters and words?
I need a way to ensure users don't enter invalid characters when entering a layer name.