@@ -118,7 +118,7 @@ public void TTFilePreliminaryRead(String filePath, StreamReader scrStream, Strin
118118 // process comment row - cell at first comment row and column is description
119119 // process path and consist row
120120
121- Description = String . Copy ( filePath ) ;
121+ Description = filePath ;
122122
123123 bool descFound = false ;
124124 bool pathFound = false ;
@@ -136,7 +136,7 @@ public void TTFilePreliminaryRead(String filePath, StreamReader scrStream, Strin
136136 {
137137 if ( String . Compare ( Parts [ 0 ] , "#comment" , true ) == 0 )
138138 {
139- Description = String . Copy ( Parts [ firstCommentColumn ] ) ;
139+ Description = Parts [ firstCommentColumn ] ;
140140 descFound = true ;
141141 }
142142 }
@@ -146,7 +146,7 @@ public void TTFilePreliminaryRead(String filePath, StreamReader scrStream, Strin
146146 {
147147 pathFound = true ;
148148 foreach ( TrainInformation train in Trains )
149- train . Path = String . Copy ( Parts [ train . Column ] ) ;
149+ train . Path = Parts [ train . Column ] ;
150150 }
151151 }
152152 if ( ! consistFound )
@@ -156,7 +156,7 @@ public void TTFilePreliminaryRead(String filePath, StreamReader scrStream, Strin
156156 consistFound = true ;
157157 foreach ( TrainInformation train in Trains )
158158 {
159- train . Consist = String . Copy ( Parts [ train . Column ] ) ;
159+ train . Consist = Parts [ train . Column ] ;
160160 train . LeadingConsist = ExtractConsist ( train . Consist , out train . ReverseConsist ) ;
161161 }
162162 }
@@ -167,7 +167,7 @@ public void TTFilePreliminaryRead(String filePath, StreamReader scrStream, Strin
167167 {
168168 startFound = true ;
169169 foreach ( TrainInformation train in Trains )
170- train . StartTime = String . Copy ( Parts [ train . Column ] ) ;
170+ train . StartTime = Parts [ train . Column ] ;
171171 }
172172 }
173173 if ( ! briefingFound )
@@ -177,9 +177,9 @@ public void TTFilePreliminaryRead(String filePath, StreamReader scrStream, Strin
177177 briefingFound = true ;
178178
179179 // Newlines "\n" cannot be emdedded in CSV files, so HTML breaks "<br>" are used instead.
180- Briefing = String . Copy ( Parts [ 1 ] . Replace ( "<br>" , "\n " ) ) ;
180+ Briefing = Parts [ 1 ] . Replace ( "<br>" , "\n " ) ;
181181 foreach ( TrainInformation train in Trains )
182- train . Briefing = String . Copy ( Parts [ train . Column ] ) . Replace ( "<br>" , "\n " ) ;
182+ train . Briefing = Parts [ train . Column ] . Replace ( "<br>" , "\n " ) ;
183183 }
184184 }
185185
@@ -192,8 +192,8 @@ private string ExtractConsist(string consistDef, out bool reverse)
192192 {
193193 bool isReverse = false ;
194194
195- string reqString = String . Copy ( consistDef ) ;
196- string consistProc = String . Copy ( consistDef ) . Trim ( ) ;
195+ string reqString = consistDef ;
196+ string consistProc = consistDef . Trim ( ) ;
197197
198198 if ( consistProc . Substring ( 0 , 1 ) . Equals ( "<" ) )
199199 {
@@ -228,7 +228,7 @@ private string ExtractConsist(string consistDef, out bool reverse)
228228 }
229229 else
230230 {
231- reqString = String . Copy ( consistDef ) ;
231+ reqString = consistDef ;
232232
233233 int sepIndex = consistDef . IndexOf ( '$' ) ;
234234 if ( sepIndex > 0 )
@@ -272,7 +272,7 @@ public class TrainInformation : IComparable<TrainInformation>
272272 public TrainInformation ( int column , string train )
273273 {
274274 Column = column ;
275- Train = string . Copy ( train ) ;
275+ Train = train ;
276276 Consist = string . Empty ;
277277 LeadingConsist = string . Empty ;
278278 Path = string . Empty ;
0 commit comments