Skip to content

Add CSharp and Go templates for assignment M#12

Open
kronos wants to merge 3 commits into
java-templatesfrom
M-csharp-and-go
Open

Add CSharp and Go templates for assignment M#12
kronos wants to merge 3 commits into
java-templatesfrom
M-csharp-and-go

Conversation

@kronos

@kronos kronos commented Nov 4, 2024

Copy link
Copy Markdown
Collaborator

No description provided.

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

/** Comment it before submitting

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Comment thread M/csharp/code.cs Outdated

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

@vkazar vkazar Nov 4, 2024

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

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

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

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

Copy link
Copy Markdown

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