File tree Expand file tree Collapse file tree
csharp/ToolGood.Algorithm Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -334,7 +334,7 @@ public static Operand Create(List<Operand> obj)
334334 /// <returns></returns>
335335 public static Operand Create ( ICollection < string > obj )
336336 {
337- var array = new List < Operand > ( ) ;
337+ var array = new List < Operand > ( obj . Count ) ;
338338 foreach ( var item in obj ) {
339339 array . Add ( Create ( item ) ) ;
340340 }
@@ -348,7 +348,7 @@ public static Operand Create(ICollection<string> obj)
348348 /// <returns></returns>
349349 public static Operand Create ( ICollection < double > obj )
350350 {
351- var array = new List < Operand > ( ) ;
351+ var array = new List < Operand > ( obj . Count ) ;
352352 foreach ( var item in obj ) {
353353 array . Add ( Create ( item ) ) ;
354354 }
@@ -362,7 +362,7 @@ public static Operand Create(ICollection<double> obj)
362362 /// <returns></returns>
363363 public static Operand Create ( ICollection < int > obj )
364364 {
365- var array = new List < Operand > ( ) ;
365+ var array = new List < Operand > ( obj . Count ) ;
366366 foreach ( var item in obj ) {
367367 array . Add ( Create ( item ) ) ;
368368 }
@@ -376,7 +376,7 @@ public static Operand Create(ICollection<int> obj)
376376 /// <returns></returns>
377377 public static Operand Create ( ICollection < bool > obj )
378378 {
379- var array = new List < Operand > ( ) ;
379+ var array = new List < Operand > ( obj . Count ) ;
380380 foreach ( var item in obj ) {
381381 array . Add ( Create ( item ) ) ;
382382 }
You can’t perform that action at this time.
0 commit comments