Skip to content

Example.UncomparableStructPack‐3

IzayoiJiichan edited this page Feb 1, 2025 · 1 revision

Examples

using Izayoi.Data.Packs;
using System;

public class Example()
{
    public void Method1()
    {
        UncomparableStructPack<int, int, int> pack1 = new(1, 2, 3);

        UncomparableStructPack<bool, byte, short> pack2 = new(true, 2, 3);
    }

    public void Method2()
    {
        // NG
        //UncomparableStructPack<int, int, int?> pack = new(1, 2, null);

        // NG
        //UncomparableStructPack<int, int, System.Nullable<int>> pack = new(1, 2, null);
    }

    public void Method3()
    {
        UncomparableStructPack<int, int, int> pack1 = new(1, 2, 3);
        UncomparableStructPack<int, int, int> pack2 = new(1, 2, 3);

        // deprecated
        if (pack1 == pack2)
        {
            // true
        }
    }
}
Clone this wiki locally