public Dictionary
{
Dictionary
Dictionary
double _memLength = 0.0; double _totalMemLength = 0.0;
double _memVolume = 0.0; double _totalMemVolume = 0.0;
double[] _memArray;
Dictionary
foreach (string s in sec_Dict.Keys)
{
List
foreach (int n in _valueList)
{
_memLength = this.Getlengthofmember(n);
_memList.Add(n, _memLength);
_totalMemLength += _memLength;
_memVolume = this.GetVolumeofmember(n);
_totalMemVolume += _memVolume;
}
this.STAAD_NAME = s;
this.TOTAL_MEMBER_LENGTH = Math.Round(_totalMemLength, 4);
this.TOTAL_MEMBER_VOLUME = Math.Round(_totalMemVolume, 4);
if (_memList != null)
{
_memArray = new double[_memList.Count];
foreach (KeyValuePair
{
_memArray = _memList.Values.ToArray();
}
if (_memArray != null && _memArray.Length > 0)
{
this.LONGEST_MEMBER_ID = _memList.FirstOrDefault(x => x.Value.Equals(_memArray.Max())).Key;
this.LONGEST_MEMBER_LENGTH = _memArray.Max();
this.SHORTEST_MEMBER_ID = _memList.FirstOrDefault(x => x.Value.Equals(_memArray.Min())).Key;
this.SHORTEST_MEMBER_LENGTH = _memArray.Min();
}
}
List
list.Add(this.TOTAL_MEMBER_LENGTH);
list.Add(this.TOTAL_MEMBER_VOLUME);
list.Add(this.LONGEST_MEMBER_ID);
list.Add(this.LONGEST_MEMBER_LENGTH);
list.Add(this.SHORTEST_MEMBER_ID);
list.Add(this.SHORTEST_MEMBER_LENGTH);
memberData.Add(this.STAAD_NAME, list);
}
return memberData;
}
Please can anyone help me on this quickly.
Guest UserPosted Aug 21, 2014, 5:24 AM
Aside from that, perhaps you can use Parallel.ForEach()