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

Add CSharp and Go templates for assignment M #12

Open
wants to merge 3 commits into
base: java-templates
Choose a base branch
from

Conversation

kronos
Copy link
Collaborator

@kronos kronos commented Nov 4, 2024

No description provided.

M/csharp/code.cs Outdated
using System.Collections;
using System.Collections.Generic;

/** Comment it before submitting
Copy link

Choose a reason for hiding this comment

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

Есть Preprocessor Directives, в других ЯПах я встречал аналогичные использования.
Может, стоит добавить обработку?

M/csharp/code.cs Outdated

/** Comment it before submitting
public class Node {
public int val;
Copy link

@vkazar vkazar Nov 4, 2024

Choose a reason for hiding this comment

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

по канону
public int Val { get; }

M/csharp/code.cs Outdated
neighbours = new List<Node>();
}

public Node(int _val, List<Node> _neighbours) {
Copy link

Choose a reason for hiding this comment

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

с подчёркиванием обычно делают backing fields, а параметры без него

M/csharp/code.cs Outdated
/** Comment it before submitting
public class Node {
public int val;
public IList<Node> neighbours;
Copy link

Choose a reason for hiding this comment

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

IReadOnlyList?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants