diff --git a/src/EditorFeatures/Core/Implementation/IntelliSense/Completion/Model.cs b/src/EditorFeatures/Core/Implementation/IntelliSense/Completion/Model.cs index df7c6592ce86b4ab902b3c6eec3e330c649c80b8..79c06cb923883d41a4c83f4364509a61181eb547 100644 --- a/src/EditorFeatures/Core/Implementation/IntelliSense/Completion/Model.cs +++ b/src/EditorFeatures/Core/Implementation/IntelliSense/Completion/Model.cs @@ -266,7 +266,7 @@ internal SnapshotSpan GetCurrentSpanInSnapshot(ViewTextSpan originalSpan, ITextS var currentSpan = GetCurrentSpanInSnapshot(originalSpan, textSnapshot); var startPosition = currentSpan.Start; - var endPosition = endPoint.HasValue ? endPoint.Value : currentSpan.End; + var endPosition = endPoint ?? currentSpan.End; // TODO(cyrusn): What to do if the span is empty, or the end comes before the start. // Can that even happen? Not sure, so we'll just be resilient just in case. diff --git a/src/VisualStudio/Core/Def/Implementation/Venus/ContainedDocument.cs b/src/VisualStudio/Core/Def/Implementation/Venus/ContainedDocument.cs index 7bf8da22686814bb7d6650ec513a0a9e432b8c2e..65210e089ef0e25387e55f35cc4f7a028e71b78a 100644 --- a/src/VisualStudio/Core/Def/Implementation/Venus/ContainedDocument.cs +++ b/src/VisualStudio/Core/Def/Implementation/Venus/ContainedDocument.cs @@ -589,7 +589,7 @@ private IHierarchicalDifferenceCollection DiffStrings(string leftTextWithReplace var diffService = _differenceSelectorService.GetTextDifferencingService( _workspace.Services.GetLanguageServices(_project.Language).GetService().GetDefaultContentType()); - diffService = diffService ?? _differenceSelectorService.DefaultTextDifferencingService; + diffService ??= _differenceSelectorService.DefaultTextDifferencingService; return diffService.DiffStrings(leftTextWithReplacement, rightTextWithReplacement, s_venusEditOptions.DifferenceOptions); } diff --git a/src/Workspaces/Remote/ServiceHub/Shared/Extensions.cs b/src/Workspaces/Remote/ServiceHub/Shared/Extensions.cs index 48baf842fcf8716552bcff78529f60612b733d2a..01d2db0812af37ba0b681b8fb10e3d85230b76a7 100644 --- a/src/Workspaces/Remote/ServiceHub/Shared/Extensions.cs +++ b/src/Workspaces/Remote/ServiceHub/Shared/Extensions.cs @@ -23,7 +23,7 @@ internal static partial class Extensions TraceSource logger, IEnumerable jsonConverters = null) { - jsonConverters = jsonConverters ?? SpecializedCollections.EmptyEnumerable(); + jsonConverters ??= SpecializedCollections.EmptyEnumerable(); var jsonFormatter = new JsonMessageFormatter(); jsonFormatter.JsonSerializer.Converters.AddRange(jsonConverters.Concat(AggregateJsonConverter.Instance));