This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
public class Class1 { // find a more descriptive class name | |
public static bool IsFormat(string str, string f) // rename f to format and rename to IsFormatValid | |
{ | |
var allowedDict = new Dictionary<string, bool>() // use an Array instead of a Dictionary | |
{ | |
{ "number",true}, | |
{ "date",true}, | |
{ "timespan",true} |