Skip to content

Rectangle has two of each property #18

@Kinkyboo

Description

@Kinkyboo

Both uppercase and lowercase property names are public.
The lowercase name should be private or protected.

Checking the repository I can only find the partial implementation of Rectangle that uses the lowercase names but does not define them, where is the other half of the rectangle class?

https://github.com/ZeroElectric/Raylib-CSharp-Vinculum/blob/5.xx-dev/Source/Raylib-CSharp-Vinculum/_wrappersOther.cs#L47

The latest nuget package presents this:

public struct Rectangle
{
    public float x;

    public float y;

    public float width;

    public float height;

    public float X
    {
        get
        {
            return x;
        }
        set
        {
            x = value;
        }
    }

    public float Y
    {
        get
        {
            return y;
        }
        set
        {
            y = value;
        }
    }

    public float Width
    {
        get
        {
            return width;
        }
        set
        {
            width = value;
        }
    }

    public float Height
    {
        get
        {
            return height;
        }
        set
        {
            height = value;
        }
    }

    public Rectangle(float x, float y, float width, float height)
    {
        this.x = x;
        this.y = y;
        this.width = width;
        this.height = height;
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions