-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhashcode.snippet
More file actions
41 lines (41 loc) · 1.47 KB
/
hashcode.snippet
File metadata and controls
41 lines (41 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2010/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>GetHashCode の実装</Title>
<Description>GetHashCode を実装します。</Description>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Shortcut>hashcode</Shortcut>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>implementation</ID>
<ToolTip>GetHashCode の実装</ToolTip>
<Default>throw new NotImplementedException();</Default>
</Literal>
</Declarations>
<Code Language="csharp" Kind="method decl">
<![CDATA[/// <summary>
/// このインスタンスのハッシュコードを取得します。
/// </summary>
/// <returns>32ビット符号付き整数ハッシュコード。</returns>
public override int GetHashCode()
{
unchecked
{
// TODO : Write your implementation of GetHashCode() here.
// ex)
// var result = _field1.GetHashCode();
// result = (result * 397) ^ _field2.GetHashCode();
// result = (result * 397) ^ _field3.GetHashCode();
// return result;
$implementation$
}
}]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>