emptycodesemptycodes.hashnode.dev·Jul 10, 2024User Input and Enums in C#An enumeration (enum) in C# is a custom type used when you need to make a choice from a set of possible options. Enums are ideal for representing things that don't fit into one of C#'s default or pre-existing types. Creating an Enum The syntax to cre...Discuss·75 readsC#
Sam KeenProsamkeen.dev·Jul 5, 2024Understanding Enums in Rust: A Beginner's GuideIf you're new to Rust, you might have encountered enums and wondered what they're all about. In this post, we'll explore Rust enums, their uses, and how they can make your code more expressive and safer. We'll cover basic enums, enums with associated...Discuss·1 like·359 readsRust
SOUMITRA-SAHAssblogs.hashnode.dev·May 26, 2024Rust Mastery Week #2Welcome back to our Rust programming journey! This is week #2. Today, we'll dive into some crucial concepts such as statements vs. expressions, comments, control flow, loops, structs, enums, options and results, pattern matching, and using modules to...Discussrust mod
Srijan Rastogisrijan-27.hashnode.dev·May 21, 2024Enums in Go: A Practical GuideIn the realm of programming, keeping code clean and error-free is a constant battle. One strategy for achieving this is by utilising enums, or enumerations. While Go doesn’t have built-in enums like some other languages, it offers alternative approac...Discuss·1 like·149 readsGo Language
Chetan Dattachetan77.hashnode.dev·May 13, 202409 Java - Classes (Part III)Pojo Class Stands for "Plani Old Java Object". Contains variables and its getter and setter methods. Class should be public. Public default constructor. No annotations should be used like @ Table, @ Entity, @ Id etc.. It hould not extend any cl...Discuss·34 readsJavaJava
Parth Raiyanirparth07.hashnode.dev·May 7, 2024Unveiling the Power of Enums in Java: A Comprehensive GuideWelcome, fellow Java enthusiasts, to our exploration of one of Java's often underestimated yet incredibly powerful features: Enums. Today, we're diving deep into the world of Enums, uncovering their myriad of advantages and demonstrating why they are...Discuss·10 likesenum
David Carrdcblog.dev·May 3, 2024PHP use an enum for FiltersI have a class that allows filtering based on an option, I need a way to accept options and also reject invalid options. In the past, I would reach for a switch statement, or more recently a match statement. But an enum is better suited for this task...DiscussFilter
Kali Baranwalkalibaranwal.hashnode.dev·Apr 30, 2024Exploring OOP Fundamentals: Part 4 BreakdownTHIS POINTER Its is a keyword which points to the objects which invokes the member function. It is used for return object. CODE: class A{ int a; public: void setdata(int a){ this->a=a; } void getdata(){ cout<<"the...Discussfriend function
Canopascanopas.hashnode.dev·Mar 22, 2024How to use Enums in GolangBackground Imagine you’re building a Todo application using Go. Each task in your application has a status associated with it, indicating whether it’s “completed”, “archived” or “deleted”. As a developer, you want to ensure that only valid status val...Discuss·82 readswebdev
Truong Nguyentruongnn.me·Feb 21, 2024Enum type in DartIntroduction Enums used to represent a fixed number of constant values. They are a helpful way to model a set of related constants in a type-safe way. Using enums can make your code more readable and maintainable by providing meaningful names for the...DiscussFlutter