Adopt inferred variable types (var) to enhance code readability and maintainability #141
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Now using inferred variable types (var) instead of explicit types in all projects except Yubico.Core. This change aims to improve code readability, reduce verbosity, and enhance developer productivity while maintaining type safety.
Key points:
Exclusion of Yubico.Core:
I excluded Yubico.Core from this change initially due to its extensive use of interop code and custom structs. This cautious approach allows us to implement the change gradually and assess its impact before applying it to more complex areas of the codebase.
By adopting 'var' in most of our projects, we aim to modernize our codebase, improve developer productivity, and enhance code maintainability while still maintaining the robustness and clarity of our type system.
Type of change
How has this been tested?
Unit tests in Yubico.Yubikey passed locally.
Checklist:
dotnet format
to format my code