| c# Programming Glossary: values.lengthGeneric logging of function parameters in exception handling http://stackoverflow.com/questions/135782/generic-logging-of-function-parameters-in-exception-handling  i j 2  msg j j 1  namevalues j parms i .Name if i values.Length namevalues j 1 values i msg exception ex.Message Console.WriteLine.. 
 Get an IDataReader from a typed List http://stackoverflow.com/questions/2258310/get-an-idatareader-from-a-typed-list  GetValues object values  int i 0 for i Fields.Count i   if values.Length i   return i   values i GetValue i  return i  public virtual.. 
 Generate random enum in C# 2.0 http://stackoverflow.com/questions/319814/generate-random-enum-in-c-sharp-2-0  T Enum.GetValues typeof T return values new Random .Next 0 values.Length Thanks to @ Marc Gravell for ponting out that the max in Random.Next.. 
 Iterate over values in Flags Enum? http://stackoverflow.com/questions/4171140/iterate-over-values-in-flags-enum  value List Enum results new List Enum for int i values.Length 1 i 0 i  ulong mask Convert.ToUInt64 values i  if i 0 mask 0L.. return results.Reverse Enum if bits Convert.ToUInt64 value values.Length 0 Convert.ToUInt64 values 0 0L return values.Take 1 return Enumerable.Empty.. 
 Convert generic List/Enumerable to DataTable? http://stackoverflow.com/questions/564366/convert-generic-list-enumerable-to-datatable  object props.Count foreach T item in data  for int i 0 i values.Length i  values i props i .GetValue item  table.Rows.Add values return.. 
 how to convert NameValueCollection to JSON string? http://stackoverflow.com/questions/7003740/how-to-convert-namevaluecollection-to-json-string    string values nvc.GetValues key  if values.Length 1   result.Add key values 0   else   result.Add key values .. 
 Import XML to SQL using C# http://stackoverflow.com/questions/772946/import-xml-to-sql-using-c-sharp  data row   string values GetRowValues rowNode  if values.Length command.Parameters.Count   TODO Log bad row  continue   this.FillCommand.. IDbCommand command string values  for int i 0 i values.Length i  IDbDataParameter param IDbDataParameter command.Parameters.. 
 |