diff --git a/src/EditorFeatures/CSharp/AutomaticCompletion/Sessions/CurlyBraceCompletionSession.cs b/src/EditorFeatures/CSharp/AutomaticCompletion/Sessions/CurlyBraceCompletionSession.cs index 1664edd86e5d8c90de3d115238998be2cb114ca7..994fdec41cc83beaae29e1ad54036439fcb0ba46 100644 --- a/src/EditorFeatures/CSharp/AutomaticCompletion/Sessions/CurlyBraceCompletionSession.cs +++ b/src/EditorFeatures/CSharp/AutomaticCompletion/Sessions/CurlyBraceCompletionSession.cs @@ -93,7 +93,7 @@ private static bool ContainsOnlyWhitespace(IBraceCompletionSession session) return false; } - for (int i = start; i <= end; i++) + for (var i = start; i <= end; i++) { if (!char.IsWhiteSpace(snapshot[i])) { diff --git a/src/EditorFeatures/CSharp/DecompiledSource/AssemblyResolver.cs b/src/EditorFeatures/CSharp/DecompiledSource/AssemblyResolver.cs index ede9ce90b2ded5bcde7755802014443959c6b163..641086c68787c017c1bb3f346949ce6a5f9361aa 100644 --- a/src/EditorFeatures/CSharp/DecompiledSource/AssemblyResolver.cs +++ b/src/EditorFeatures/CSharp/DecompiledSource/AssemblyResolver.cs @@ -57,8 +57,8 @@ public PEFile ResolveModule(PEFile mainModule, string moduleName) { // Primitive implementation to support multi-module assemblies // where all modules are located next to the main module. - string baseDirectory = Path.GetDirectoryName(mainModule.FileName); - string moduleFileName = Path.Combine(baseDirectory, moduleName); + var baseDirectory = Path.GetDirectoryName(mainModule.FileName); + var moduleFileName = Path.Combine(baseDirectory, moduleName); if (!File.Exists(moduleFileName)) { return null; diff --git a/src/EditorFeatures/CSharp/DecompiledSource/CSharpDecompiledSourceService.cs b/src/EditorFeatures/CSharp/DecompiledSource/CSharpDecompiledSourceService.cs index 99edc1e8f024f030d490381bad42697f6f577c0f..490929039df1829b61e7ae9428e51cfa60c7b178 100644 --- a/src/EditorFeatures/CSharp/DecompiledSource/CSharpDecompiledSourceService.cs +++ b/src/EditorFeatures/CSharp/DecompiledSource/CSharpDecompiledSourceService.cs @@ -108,9 +108,9 @@ private Document PerformDecompilation(Document document, string fullName, Compil private async Task AddAssemblyInfoRegionAsync(Document document, ISymbol symbol, CancellationToken cancellationToken) { - string assemblyInfo = MetadataAsSourceHelpers.GetAssemblyInfo(symbol.ContainingAssembly); + var assemblyInfo = MetadataAsSourceHelpers.GetAssemblyInfo(symbol.ContainingAssembly); var compilation = await document.Project.GetCompilationAsync(cancellationToken).ConfigureAwait(false); - string assemblyPath = MetadataAsSourceHelpers.GetAssemblyDisplay(compilation, symbol.ContainingAssembly); + var assemblyPath = MetadataAsSourceHelpers.GetAssemblyDisplay(compilation, symbol.ContainingAssembly); var regionTrivia = SyntaxFactory.RegionDirectiveTrivia(true) .WithTrailingTrivia(new[] { SyntaxFactory.Space, SyntaxFactory.PreprocessingMessage(assemblyInfo) }); diff --git a/src/EditorFeatures/CSharp/LineSeparators/CSharpLineSeparatorService.cs b/src/EditorFeatures/CSharp/LineSeparators/CSharpLineSeparatorService.cs index bb31741c89430adc6aaf56c976d465f31359b66a..0a617cfa84c239759b297ea2f36dd14eb15649c8 100644 --- a/src/EditorFeatures/CSharp/LineSeparators/CSharpLineSeparatorService.cs +++ b/src/EditorFeatures/CSharp/LineSeparators/CSharpLineSeparatorService.cs @@ -277,7 +277,7 @@ private static void ProcessUsings(SyntaxList usings, List< // first child needs no separator var seenSeparator = true; - for (int i = 0; i < children.Count - 1; i++) + for (var i = 0; i < children.Count - 1; i++) { cancellationToken.ThrowIfCancellationRequested(); diff --git a/src/EditorFeatures/CSharp/NavigationBar/CSharpNavigationBarItemService.cs b/src/EditorFeatures/CSharp/NavigationBar/CSharpNavigationBarItemService.cs index 528d643dd7a3b3f998a602104092e80b76ca9e89..37cc600e7653f5a84b4ac3efe544635c4efa0bcc 100644 --- a/src/EditorFeatures/CSharp/NavigationBar/CSharpNavigationBarItemService.cs +++ b/src/EditorFeatures/CSharp/NavigationBar/CSharpNavigationBarItemService.cs @@ -251,8 +251,8 @@ private static void AddFieldSpan(ISymbol symbol, SyntaxTree tree, List var declaringNode = reference.GetSyntax(); - int spanStart = declaringNode.SpanStart; - int spanEnd = declaringNode.Span.End; + var spanStart = declaringNode.SpanStart; + var spanEnd = declaringNode.Span.End; var fieldDeclaration = declaringNode.GetAncestor(); if (fieldDeclaration != null)