Regex.Replace(filePath, ".txt", ".zip", RegexOptions.IgnoreCase);
All types and type members have an accessibility level, which controls whether they can be used from other code in your assembly or other assemblies. You can use the following access modifiers to specify the accessibility of a type or member when you declare it:
The type or member can be accessed by any other code in the same assembly or another assembly that references it.
The type or member can be accessed only by code in the same class or struct.
The type or member can be accessed only by code in the same class or struct, or in a class that is derived from that class.
The type or member can be accessed by any code in the same assembly, but not from another assembly.
The type or member can be accessed by any code in the assembly in which it is declared, or from within a derived class in another assembly. Access from another assembly must take place within a class declaration that derives from the class in which the protected internal element is declared, and it must take place through an instance of the derived class type.
The only way I found to change the HtmlEncode property on a bound column when auto-generating the grid-view.
This code project helped me out a lot.
Don’t recall where I found this but converts List to DataTable.
Pieced this together from stackoverflow… http://stackoverflow.com/questions/2912476/using-c-sharp-to-check-if-string-contains-a-string-in-string-array/2912541#2912541
This checks if stringToCheck contains any one of substrings from stringArray.
If you want to ensure that it contains all the substrings, change Any to All:
Here is a regular expression for credit card numbers.
Below is the regex code for U.S. and Canadian zip codes. I’m don’t remember where I found these but hopefully someone finds them useful.