By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,245 Members | 1,180 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,245 IT Pros & Developers. It's quick & easy.

Enums in C# 2005 (Beta 2) Framework 2.0

P: n/a
Hello CSharpies,

Can Enums in C# be UInt32 Types, and not just Int32 Types. I have a lot of
constant declarations that are UInt32 that I want to put in Enums to ease
the use of Intellisence. I have them in structs for now, I thought I'd ask.
Would IntPtr Enums push the bounds of a stupid question?

Regarding a post a bit further down by Tom;
'[Offtopic] What would you like to change in C# and .NET?'

Enums of different types purely for rounding up like groups of alike
constant declarations for neatness and intellisense usage. Since the
functionality and purpose of structs goes beyond just grouping constants, an
emum would make better sense. I know this would defy the meaning of Enum for
most other native types.

- Thanks Newsgroup

SpotNet.
Nov 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"SpotNet" <Sp*****@msnews.grp> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hello CSharpies,

Can Enums in C# be UInt32 Types, and not just Int32 Types. I have a lot of
constant declarations that are UInt32 that I want to put in Enums to ease
the use of Intellisence. I have them in structs for now, I thought I'd
ask. Would IntPtr Enums push the bounds of a stupid question?


UInt32 yes, (C# alias is uint,btw)

public enum Name : uint
{

}

I believe you have to use uint, not UInt32, however.

IntPtr...no, not supported.
Nov 17 '05 #2

P: n/a

Thank you very much Daniel, much appreciated.

SpotNet

"Daniel O'Connell [C# MVP]" <onyxkirx@--NOSPAM--comcast.net> wrote in
message news:%2****************@tk2msftngp13.phx.gbl...

"SpotNet" <Sp*****@msnews.grp> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hello CSharpies,

Can Enums in C# be UInt32 Types, and not just Int32 Types. I have a lot
of constant declarations that are UInt32 that I want to put in Enums to
ease the use of Intellisence. I have them in structs for now, I thought
I'd ask. Would IntPtr Enums push the bounds of a stupid question?


UInt32 yes, (C# alias is uint,btw)

public enum Name : uint
{

}

I believe you have to use uint, not UInt32, however.

IntPtr...no, not supported.

Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.