Skip to content
This repository was archived by the owner on Dec 4, 2024. It is now read-only.

Commit da65bc2

Browse files
author
Mark Novak
committed
Remove redundant variable declaration
1 parent ee2ae40 commit da65bc2

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

‎FileService.cs‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,17 @@ public void ReadAllFiles()
3232
{
3333
Files = Directory.GetFiles(FolderPath, "*.svg");
3434
RegexService regex = new RegexService();
35-
string path;
36-
string fullPath;
37-
string name;
38-
string fileContent;
3935
for (int id = 0; id < Files.Length; id++ )
4036
{
4137
if (File.Exists(Files[id]))
4238
{
43-
name = Path.GetFileNameWithoutExtension(Files[id]);
39+
string name = Path.GetFileNameWithoutExtension(Files[id]);
4440

4541
Console.WriteLine($"File {name}.svg exists. reading...");
4642

47-
fileContent = File.ReadAllText(Files[id]);
48-
path = regex.GetSvgPath(fileContent);
49-
fullPath = regex.GetPathElementAsString(fileContent);
43+
string fileContent = File.ReadAllText(Files[id]);
44+
string path = regex.GetSvgPath(fileContent);
45+
string fullPath = regex.GetPathElementAsString(fileContent);
5046
RegexResults.Add(new FileOutput { ID = id + 1, Path = path, FullPath = fullPath, Name = name });
5147
}
5248
}

0 commit comments

Comments
 (0)