Bamboo.Prevalence.Collections.List.Choose C# (CSharp) Method

Choose() public method

Selects an random item from the list.
public Choose ( ) : object
return object
		public object Choose()
		{
			AcquireReaderLock();
			try
			{
				if (_list.Count > 0)
				{
					lock (_random)
					{
						return _list[_random.Next(_list.Count)];
					}
				}
				return null;
			}
			finally
			{
				ReleaseReaderLock();
			}
		}
		

Same methods

List::Choose ( int count ) : Array