IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
Label.cs
Go to the documentation of this file.
1// Licensed to the .NET Foundation under one or more agreements.
2// The .NET Foundation licenses this file to you under the MIT license.
3
4#nullable enable
5
6using System;
7using System.Diagnostics.CodeAnalysis;
8
10{
20 internal readonly struct Label : IEquatable<Label>
21 {
22 internal readonly int m_label;
23
24 internal Label(int label) => m_label = label;
25
29 public int Id => m_label;
30
31 public override int GetHashCode() => m_label;
32
33 public override bool Equals(object? obj) =>
34 obj is Label other && Equals(other);
35
36 public bool Equals(Label obj) =>
37 obj.m_label == m_label;
38
39 public static bool operator ==(Label a, Label b) => a.Equals(b);
40
41 public static bool operator !=(Label a, Label b) => !(a == b);
42 }
43}
44
45#nullable restore