Frida Docs Unified
    Preparing search index...
    • Wraps the given primitive or value type in a System.Nullable<T>, also known as a nullable value type (T?), to represent primitive or value types that might be null (ref).
      Reference types shall not be turned into nullable, as they are already covered by the C# null keywork and new Il2Cpp.Object(NULL) in Frida.

      const nullableBoolean = Il2Cpp.nullable(false);
      const nullableInt32 = Il2Cpp.nullable(13);
      const nullableValueType = Il2Cpp.nullable(myValueType);

      const nullableNumber = Il2Cpp.nullable(13, Il2Cpp.corlib.class("System.UInt16"));
      const nullableUnsignedPointer = Il2Cpp.nullable(ptr(0xdeadbeef), Il2Cpp.corlib.class("System.UIntPtr"));

      const nullPrimitiveOrValueType = Il2Cpp.nullable(null, Il2Cpp.corlib.class("..."));

      Internally, System.Nullable<T> prepends to the value type values layout a boolean to indicate whether it's not null:

      struct System.Nullable<System.Int32> : System.ValueType
      {
      System.Boolean hasValue; // 0x10
      System.Int32 value; // 0x14
      ...

      Parameters

      Returns ValueType

    • Wraps the given primitive or value type in a System.Nullable<T>, also known as a nullable value type (T?), to represent primitive or value types that might be null (ref).
      Reference types shall not be turned into nullable, as they are already covered by the C# null keywork and new Il2Cpp.Object(NULL) in Frida.

      const nullableBoolean = Il2Cpp.nullable(false);
      const nullableInt32 = Il2Cpp.nullable(13);
      const nullableValueType = Il2Cpp.nullable(myValueType);

      const nullableNumber = Il2Cpp.nullable(13, Il2Cpp.corlib.class("System.UInt16"));
      const nullableUnsignedPointer = Il2Cpp.nullable(ptr(0xdeadbeef), Il2Cpp.corlib.class("System.UIntPtr"));

      const nullPrimitiveOrValueType = Il2Cpp.nullable(null, Il2Cpp.corlib.class("..."));

      Internally, System.Nullable<T> prepends to the value type values layout a boolean to indicate whether it's not null:

      struct System.Nullable<System.Int32> : System.ValueType
      {
      System.Boolean hasValue; // 0x10
      System.Int32 value; // 0x14
      ...

      Parameters

      Returns ValueType