How To: Restrict values passed to a function, procedure or a property
Category:
C#, VB.NET, ASP.NETType:
SnippetsDifficulty:
IntermediateAuthor:
Pankaj BangaVersion Compatibility: Visual Basic.NET
More information:
Sometime we have to restrict the values passed into a function, procedure or a property. A common practice is to validate values inside the code, which may involve heaps of IF conditions. This sample illustrates how you can utilize Enumeration, to make the process more efficient. Download supplied as documentation and samples.
Instructions: Click the link below to download the code. Select 'Save' from the IE popup dialog. Once downloaded, open the .zip file from your local drive using WinZip or a comparable program to view the contents.
Download restrictvaluespassedtoafunction.zip