Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Naming Conventions #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
484 changes: 484 additions & 0 deletions .gitignore

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions ModernizedCode/FileScopedObjects.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ file class FileScoped
public string? Name { get; set; }
}

class useit
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useit to Useit, what do you think?

class Useit
{
void usething()
void Usething()
{
FileScoped fs = new FileScoped();
}
Expand Down
6 changes: 3 additions & 3 deletions ModernizedCode/Nullability.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
Console.WriteLine($"Length of '{s}': {s.Length}");
}*/

public void attemptNullPrintWithGuard()
public void AttemptNullPrintWithGuard()
{
string s = GetValue();
string? s = GetValue();
Console.WriteLine(s != null
? $"Length of '{s}': {s.Length}"
: "String is null.");
}

private string GetValue()
private string? GetValue()
{
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion ModernizedCode/Nullable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Student
{
public string? Name { get; set; }

void register(string name)
void Register(string name)
{
var x = name.Length;
}
Expand Down
2 changes: 1 addition & 1 deletion ModernizedCode/PatternMatching.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void IsBigCircle(object shape)

// list patterns in C# 11 enable you to match an array or list against a sequence of patterns
// good old fashioned delete and replace code
public void listPatterns()
public void ListPatterns()
{
int[] numbers = { 1, 2, 3 };

Expand Down
2 changes: 1 addition & 1 deletion ModernizedCode/StringInterpolation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void ProcessStrings()
$"{ person.FirstName}, Glad to have you here !";
}

void stringInterpolationInSwitch(int safetyScore)
void StringInterpolationInSwitch(int safetyScore)
{
string message = $"The usage policy for {safetyScore} is {
safetyScore switch
Expand Down
2 changes: 1 addition & 1 deletion ModernizedCode/SwitchExpressions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public static void ToOrientationOriginal(Direction direction)
$"Not expected direction value: {direction}"),
};

public static void checkDirection()
public static void CheckDirection()
{
var direction = Direction.Right;
Console.WriteLine($"Map view direction is {direction}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[assembly: System.Reflection.AssemblyCompanyAttribute("ModernizedCode")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+d4bc1cf1bd5f8c747bca98aa023d9dda6040c19f")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+2f9bd5074baa3f29b41027e096b09229fbdacc51")]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this file should have been checked into this PR. I believe we're missing a .gitignore

[assembly: System.Reflection.AssemblyProductAttribute("ModernizedCode")]
[assembly: System.Reflection.AssemblyTitleAttribute("ModernizedCode")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
Expand Down