Inline out variable declaration

This commit is contained in:
Stepan Goremykin
2023-04-06 19:21:29 +02:00
parent 6ae1903453
commit c051736c80
7 changed files with 10 additions and 21 deletions

View File

@@ -77,8 +77,7 @@ namespace Rssdp.Infrastructure
message.Version = ParseHttpVersion(parts[0].Trim());
int statusCode = -1;
if (!Int32.TryParse(parts[1].Trim(), out statusCode))
if (!Int32.TryParse(parts[1].Trim(), out var statusCode))
{
throw new ArgumentException("data status line is invalid. Status code is not a valid integer.", nameof(data));
}