Skip to content

Lack of Encapsulation #79

Description

@ipz234

File: Program.cs
Problem:

  • All properties of the Something class are public, which allows you to change them directly.

  • Guid.NewGuid().ToString("N") is generated in the constructor, but there is no guarantee that the Id will not change after initialization.

  • DateTime.Now in Date creates a variable that changes on each new instance, which can be undesirable behavior.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions