C#: Use var everywhere

This commit is contained in:
Tamas Vajk
2020-10-02 13:45:38 +02:00
parent 7d544e34af
commit aec4481cfb
73 changed files with 196 additions and 195 deletions

View File

@@ -144,7 +144,7 @@ namespace Semmle.Extraction.CIL.Driver
while (assembliesToReference.Any())
{
var item = assembliesToReference.Pop();
if (assembliesRead.TryGetValue(item, out AssemblyInfo? info))
if (assembliesRead.TryGetValue(item, out var info))
{
if (!info.extract)
{
@@ -213,7 +213,7 @@ namespace Semmle.Extraction.CIL.Driver
if (File.Exists(path))
{
assemblyList.AddFile(path, true);
string? directory = Path.GetDirectoryName(path);
var directory = Path.GetDirectoryName(path);
if (directory is null)
{
throw new InternalError($"Directory of path '{path}' is null");