Beispiel #1
0
        /// <summary>
        /// Returns the String toFormat formatted with the given mask.
        /// </summary>
        /// <param name="_toFormat">The String object to format.</param>
        /// <param name="_mask">The format to apply.</param>
        /// <param name="dayOfWeek">A value chosen from the FirstDayOfWeek enumeration that specifies the first day of the week.</param>
        /// <param name="weekOfYear">A value chosen from the FirstWeekOfYear enumeration that specifies the first week of the year.</param>
        /// <returns>Empty String if toFormat is null or empty, othewise the formatted string.</returns>
        public static String Format(object _toFormat, object _mask, Microsoft.VisualBasic.FirstDayOfWeek dayOfWeek, Microsoft.VisualBasic.FirstWeekOfYear weekOfYear)
        {
            string toFormat = Convert.ToString(_toFormat);
            string mask     = Convert.ToString(_mask);

            if (String.IsNullOrEmpty(toFormat))
            {
                return(String.Empty);
            }
            return(Microsoft.VisualBasic.Compatibility.VB6.Support.Format(toFormat, mask, dayOfWeek, weekOfYear));
        }
Beispiel #2
0
 /// <summary>
 /// Returns the String toFormat formatted with the given mask.
 /// </summary>
 /// <param name="toFormat">The String object to format.</param>
 /// <param name="mask">The format to apply.</param>
 /// <param name="dayOfWeek">A value chosen from the FirstDayOfWeek enumeration that specifies the first day of the week.</param>
 /// <returns>Empty String if toFormat is null or empty, othewise the formatted string.</returns>
 public static String Format(object toFormat, object mask, Microsoft.VisualBasic.FirstDayOfWeek dayOfWeek)
 {
     return(Format(toFormat, mask, dayOfWeek, Microsoft.VisualBasic.FirstWeekOfYear.Jan1));
 }
 public static string Format(object Expression, string Style, Microsoft.VisualBasic.FirstDayOfWeek DayOfWeek, Microsoft.VisualBasic.FirstWeekOfYear WeekOfYear)
 {
 }