C# enum menu

Shout-Out

User Tag List

Thread: C# enum

Results 1 to 4 of 4
  1. #1
    nopz's Avatar Active Member
    Reputation
    67
    Join Date
    Aug 2009
    Posts
    56
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    C# enum

    Hi there,

    I'm using Visual Studio 2010 and I don't understand how enum cast work?

    When i create an Enum like this:

    public Enum offsets : uint {
    BASE = 0x00AA,
    };

    I have to cast offsets.BASE to an uint again. This is so strange according to that thread (C# Station: C# Tutorial Lesson 17 - Enums).

    C# enum
  2. #2
    Clain's Avatar Banned
    Reputation
    179
    Join Date
    Jan 2008
    Posts
    1,396
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  3. #3
    nopz's Avatar Active Member
    Reputation
    67
    Join Date
    Aug 2009
    Posts
    56
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    So an Enum is actually considered as a int even if i cast to uint..

  4. #4
    Clain's Avatar Banned
    Reputation
    179
    Join Date
    Jan 2008
    Posts
    1,396
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, the default type of an enum is an int, unless you specify otherwise(which you did, uint). You still have to explicit cast the enum type to a uint.

Similar Threads

  1. [WoW] Constant Data (Enums, Structs, Etc)
    By Apoc in forum WoW Memory Editing
    Replies: 67
    Last Post: 10-30-2022, 07:10 AM
  2. Replies: 0
    Last Post: 10-06-2010, 04:14 PM
  3. .NET 4.0: Enum.HasFlag is not what you might expect...
    By XTZGZoReX in forum WoW Memory Editing
    Replies: 0
    Last Post: 06-11-2010, 07:43 AM
  4. 3.1.1 Enums And Other Things Freshly Extracted.
    By Ickybad in forum WoW EMU General Releases
    Replies: 5
    Last Post: 05-01-2009, 04:30 AM
  5. enum eUnitFields in C#
    By naa in forum WoW Memory Editing
    Replies: 5
    Last Post: 01-28-2009, 01:12 PM
All times are GMT -5. The time now is 02:02 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search