MvcValidatorToolkit/Validators/ValidateDate.cs
/// <summary>
/// Gets a string array from the date format string.
/// </summary>
Gets a string array from the date format string.
Gets a string array from the date format string .
protected string[] GetDateFormatArray()
		{
			List<string> list = new List<string>();
			if(!string.IsNullOrEmpty(DateFormats))
			{
				string[] dateFormats = DateFormats.Split(",".ToCharArray());
				foreach(string df in dateFormats)
				{
					string dateFormat = df.Trim();
					if(list.Contains(dateFormat) == false)
						list.Add(dateFormat);
				}
			}
			return list.ToArray();
		}
protected string [ ] GetDateFormatArray ( ) { List < string > list = new List < string > ( ) ; if ( ! string . IsNullOrEmpty ( DateFormats ) ) { string [ ] dateFormats = DateFormats . Split ( " " . ToCharArray ( ) ) ; foreach ( string df in dateFormats ) { string dateFormat = df . Trim ( ) ; if ( list . Contains ( dateFormat ) == false ) list . Add ( dateFormat ) ; } } return list . ToArray ( ) ; }
Gets a string array from the date format string.
Gets a string array from the date format string .