Skip to content

Commit 6d33e19

Browse files
committed
Replaced \n with Enviroment.NewLine
1 parent 6faa213 commit 6d33e19

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

PowerPing/Display.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,8 @@ public static void PingResults(Ping ping)
376376
// Display stats
377377
double percent = (double)results.Lost / results.Sent;
378378
percent = Math.Round(percent * 100, 1);
379-
Console.WriteLine("\nStats for {0}:", attrs.Address);
379+
Console.WriteLine();
380+
Console.WriteLine("Stats for {0}:", attrs.Address);
380381
Console.WriteLine("------------------------");
381382

382383
if (NoColor)

PowerPing/Helper.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public static string VerifyAddress(string address, AddressFamily af)
122122

123123
// If no address resolved then exit
124124
if (ipAddr == null)
125-
PowerPing.Display.Error("PowerPing could not find the host address [" + address + "]\nCheck address and try again.", true, true);
125+
PowerPing.Display.Error("PowerPing could not find the host address [" + address + "] " + Environment.NewLine + "Check address and try again.", true, true);
126126

127127
return ipAddr.ToString();
128128
}
@@ -142,7 +142,8 @@ public static void whoami()
142142
/// <param name="exit">switch to use word "exit" instead of "continue"</param>
143143
public static void Pause(bool exit = false)
144144
{
145-
Console.Write("Press any key to " + (exit ? "exit" : "continue") + " . . .\n");
145+
Console.Write("Press any key to " + (exit ? "exit" : "continue") + " . . .");
146+
Console.WriteLine();
146147
Console.ReadKey();
147148
}
148149

PowerPing/Ping.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ private Socket CreateRawSocket(AddressFamily family)
296296
}
297297
catch (SocketException)
298298
{
299-
PowerPing.Display.Error("Socket cannot be created\nPlease run as Administrator and try again.", true);
299+
PowerPing.Display.Error("Socket cannot be created " + Environment.NewLine + "Please run as Administrator and try again.", true);
300300
}
301301
return s;
302302
}

build/PowerPing.exe

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)