Avectra.netForum.Common.UtilityFunctions

Utility Functions is a struct that contains dozens of frequently used methods.

Methods

  • AddScheduledTask - adds a "run once" Windows Scheduled Task to the windows task scheduler.
  • DateCompare - Compares two dates and returns whether the first date is Earlier, Later or the Same as the second date.
  • DateTimeBlankTime - when you pass in a DateTime, it returns that DateTime with the Time portion set to 00:00:00.000.
  • ErrorThrown - Returns true if Config.LastError contains an error, else false. Useful for inspecting if the previous action threw an error.
  • FindControl - Casts a System.Web.UI.Control based on a control on a NetForum form.
  • IsDate - Returns true if the Object parameter evaluates to a type of System.DateTime.
  • IsGuid (string szGuid). Pass in a string, returns true if value is a valid GUID, else returns false. See GUID for sample use.
Please add new methods to this class as needed, and link each new method to a new page (unless the method is very simple). Name each page the full method name to tighen the page naming (e.g. name page Avectra.netForum.Data.FacadeClass.GetValue instead of just GetValue). Each new page should use the Template:Method which you can copy-paste from this page Template:Method.

Methods related to data are in a separate struct called Data Utils.