csharp Contains
//string collection
string[] myCodes = {"ABC123","ABC456"};
if (myCodes.Contains("ABC123"))
{
//match found - do something!
}
//integer collection
int[] downloadOrdersHours = { 1, 5, 9, 13, 17, 21 };
if (downloadOrdersHours.Contains(DateTime.Now.Hour))
{
DownloadOrders();
}Example usage of Contains with a collection.
Updated: Monday 1st November 2010, 06:03am
There are 0 comments
Comments are currently closed.