Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Kapitel 1. Einführung in die Microsoft W... > Ihr erstes Workflow-Programm

1.6. Ihr erstes Workflow-Programm

Hier ist ein kleiner Codeschnipsel, der eine syntaktische Postleitzahlenüberprüfung durchführt. Es handelt sich um einen Programmteil, den Sie wohl wie im Folgenden zu sehen oder auf eine sehr ähnliche Art und Weise realisieren würden:

protected const string USCode =
    @"^(\d{5}$)|(\d{5}$\-\d{4}$)";
protected const string CanadianCode =
    @"[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d";

public static bool ValidatePostalCode(string str)
{
    return (Regex.IsMatch(str, USCode) ||
        Regex.IsMatch(str, CanadianCode));
}


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint