CredentialV1 Constructor

Initializes a new instance of the CredentialV1 class.

Namespace: Gamanet.C4.SimpleInterfaces
Assembly: Gamanet.C4.SimpleInterfaces (in Gamanet.C4.SimpleInterfaces.dll) Version: 2026.0.0.242
Syntax
C#
public CredentialV1(
	Guid id,
	Guid categoryId
)

Parameters

id  Guid
The identifier.
categoryId  Guid
The category identifier.
Remarks

Supported from

  • 2020
  • Example
    The following example illustrates how to create credential Card
    C#
    using Gamanet.C4.SDK.Enums.Core;
    using Gamanet.C4.SDK.Enums.Credentials;
    using Gamanet.C4.SimpleInterfaces;
    using System;
    
    public class CreateCredentialCard
    {
        static void Main()
        {
            var card26TypeId = Guid.Parse("933A9186-E705-4849-9369-9EE227681DC9"); // credential type for card 26 which is allowed in C4
    
            // create instance of credential
            var card = new Credential(
                Guid.NewGuid(), // new Id for credential
                card26TypeId);
    
            // required parameters for card
            card.Code = "1234"; // card code
    
            card.Status = CredentialStatus.Enabled;
            card.Owner = Guid.Parse("Id of existing company or PersonRoot");
            card.HolderId = Guid.Parse("Id of existing person");
    
            // this 'card' object is fully ready to create
        }
    }
    See Also

    Reference

    CredentialV1 Class
    Gamanet.C4.SimpleInterfaces Namespace
    [!:FingerV1]
    [!:FingerType]
    CredentialTypeV1