Replace using block with a using declaration in SingleInstance.cs

This commit is contained in:
Yusyuriv 2024-04-11 13:54:50 +06:00
parent 950b4c91d3
commit f7bf681ee2
No known key found for this signature in database
GPG key ID: A91C52E6F73148E0

View file

@ -293,10 +293,8 @@ public static class SingleInstance<TApplication>
{
try
{
using (TextReader reader = new StreamReader(cmdLinePath, Encoding.Unicode))
{
args = NativeMethods.CommandLineToArgvW(reader.ReadToEnd());
}
using TextReader reader = new StreamReader(cmdLinePath, Encoding.Unicode);
args = NativeMethods.CommandLineToArgvW(reader.ReadToEnd());
File.Delete(cmdLinePath);
}