じゃんぬねっと Blog

しょーもない日記

ホーム 連絡をする 同期する ( RSS 2.0 ) Login
投稿数  983  : 記事  4  : コメント  21216  : トラックバック  277

ニュース

My Website

初心者向けのサイトです。

C# と VB.NET の入門サイト

最近のできごと

年収がもうすぐ 4 桁万円 (残業はありません)。技術、コンサルに自信ある人は連絡して。


最高の配偶者、可愛い娘、ハンサムな息子と幸せな日々を送っています。



ゴリラ?そんなの飼っていません!

Sponsored Link1

Sponsored Link2

Archive

書庫

前の記事に続く第二弾。(^^;)
突っ込みがくる前に書いてみた。

.NET (CLR) における列挙体の正体は、System.Enum クラスを継承した値型のクラスです。
いや、そんなことはオブジェクト ブラウザを見ればすぐに察しがつくことなのですがw
(前回の記事と同じようなこと書いてるしw)

クラスの定義で System.Enum クラスを継承しようとすると、コンパイラに叱られます。(^^;)
列挙体は暗黙的に System.Enum だけを継承できるクラスというわけです。
System.Enum 自体も System.ValueType から継承しているクラスですから当然といえば当然ですね。

下記の列挙体は、(前回は C# だったので今回は VB で書きます)

VB.NET

Namespace System

    Public Enum DayOfWeek As Integer
        Sunday    = 0
        Monday    = 1
        Tuesday   = 2
        Wednesday = 3
        Thursday  = 4
        Friday    = 5
        Saturday  = 6
    End Enum

End Namespace

次のようなクラスであると考えることができます。
NotInheritable クラスになっているのは継承ができないからです。

VB.NET

Namespace System

    Public NotInheritable Class DayOfWeek : Inherits System.Enum
        Public Const Sunday    As Integer = 0
        Public Const Monday    As Integer = 1
        Public Const Tuesday   As Integer = 2
        Public Const Wednesday As Integer = 3
        Public Const Thursday  As Integer = 4
        Public Const Friday    As Integer = 5
        Public Const Saturday  As Integer = 6
    End Class

End Namespace

た、多分ね。(^^;)

関連記事

投稿日時 : 2005年12月25日 14:41

コメント

# re: 列挙体の正体は Enum を継承したクラス 2005/12/25 17:55 なか
てすと

# re: 列挙体の正体は Enum を継承したクラス 2005/12/25 19:16 じゃんぬ
>なかの人
テスト乙w

# re: 列挙体の正体は Enum を継承したクラス 2005/12/25 20:47 シャノン
.NET Framework で特殊なクラスは、Array、Enum、ValueType、(MultiCast)Delegate の4つでしたっけ。

#というか Enum って ValueType の派生だったんですね。

# re: 列挙体の正体は Enum を継承したクラス 2005/12/25 21:05 じゃんぬ
> というか Enum って ValueType の派生だったんですね。

まあ、値型は全部そうッスからね。

# re: 列挙体の正体は Enum を継承したクラス 2005/12/25 21:50 囚人
>#というか Enum って ValueType の派生だったんですね。

ぬぉ~TT

ValueType から派生したクラスはシールでしょぉ!
Enum は何で抽象なのよぉ!!
特別とか言わないで、何とか辻褄合わせてほしかった…。

# re: 列挙体の正体は Enum を継承したクラス 2005/12/25 22:36 じゃんぬ
シール クラスにしちゃったら、何もできなくなっちゃうじゃんw

# re: 列挙体の正体は Enum を継承したクラス 2005/12/25 22:58 もりた
でも、インタフェースが使用できてしまうんですよね(ボソ

# re: 列挙体の正体は Enum を継承したクラス 2005/12/25 23:32 じゃんぬ
いや、だからね、そのあたりは、制限されているから、
暗黙的にしか継承できないんじゃないですかーw

でなきゃ、struct とか enum とかキーワード要らないッスよー。
何なら、Java みたいにシンプルにいきますか? こら (w

# re: 列挙体の正体は Enum を継承したクラス 2005/12/25 23:58 シャノン
> Java みたいにシンプルにいきますか? こら (w

望むところだw(コラコラ

# re: 列挙体の正体は Enum を継承したクラス 2005/12/26 0:23 名無しぃシャープ
おまいら、今日から、プロパティ構文、enum、struct、デリゲート全部没収だ。
そうそう、ついでだから明日からJ#を使うようにw

-以上だ。

# Wholesale Cosmetics 2015/09/20 16:00 foifrkvelc
http://zolife.com/images/ genuine mac makeup, http://www.stambeck.com/classes/ mac cosmetics kit, http://www.falang.se/logs/ price of mac cosmetics, http://www.falang.se/classes/ order mac products online, http://www.hiltonbyggare.se/images/ mac skincare products, http://www.nordicboat.com/mac-lipstick-wholesale/ mac lipstick wholesale, http://www.ambumedica.se/online-mac-make-up/ online mac make up, http://www.gamsatermedia.se/shopping/ mac make up remover, http://www.gamsatermedia.se/images/ mac makeup online shop, http://www.skpbuilders.com/google/ mac make up, http://www.beregovoe.info/images/ mac lipsticks, http://www.nhlog.co.th/images/ mac makeup sets, http://www.nhlog.co.th/Scripts/ mac makeup stores, http://www.nhlog.co.th/Aol/ make up for sale, http://ondaminigolfe.com/Images/index.asp cheap mac make up, http://sorologico.pt/mac-blusher-brush.html mac blusher brush, http://www.existir.org.pt/Classic/ mac makeup free, http://www.arujaesquadrias.com.br/Imagens/ mac makeup lipsticks YCOIX-DST

# CS:OPERATE C MISBEHAVE ON Stash - Flick ending of all skins, stickers and items 2016/02/25 14:52 Ronaldnuap
http://nteu45.org/uploads/cs-global-offensive-price.htmlcs global offensive price

http://www.cambridgegroup.net/uploads/cs-go-m4a4-skins.htmlcs go m4a4 skins

http://www.satdw.com/uploads/counter-stike-go.htmlcounter stike go

http://www.doori-nyc.com/uploads/cs-go-steam-key-free.htmlcs go steam key free

http://www.putnam-sheriff.org/uploads/csgo-all-skins.htmlcsgo all skins

http://www.calfireslo.org/uploads/counterstrike-globaloffensive.htmlcounterstrike globaloffensive

http://www.themathpage.com/news/bet-cs-go.htmlbet cs go

http://www.ptcny.com/uploads/go-skins.htmlgo skins

http://www.colorado-serum.com/uploads/c-sgo.htmlc sgo

http://www.valleycom.org/uploads/new-cs-go.htmlnew cs go

http://www.ptcny.com/uploads/new-case-cs-go.htmlnew case cs go

http://www.ptcny.com/uploads/cs-go-skins-list.htmlcs go skins list

http://www.kershawleonard.net/uploads/steam-store-cs-go.htmlsteam store cs go

http://www.anglingthailand.com/uploads/skin-database.htmlskin database

http://www.mbiaz.com/uploads/csgo-skins.htmlcsgo skins

http://www.binarystarltd.com/uploads/csgo-market-price.htmlcsgo market price

http://www.ptcny.com/uploads/cs-go-skins-list.htmlcs go skins list

http://www.datamology.com/uploads/cs-go-market-steam.htmlcs go market steam

http://primaadvisors.com/uploads/cs-global-offensive-requirements.htmlcs global offensive requirements

http://www.dspr-me.org/uploads/cs-go-skin-drops.htmlcs go skin drops

http://www.datamology.com/uploads/counter-strike-global-offensive-servers.htmlcounter strike global offensive servers

http://www.calfireslo.org/uploads/how-to-download-cs-go.htmlhow to download cs go

http://www.socorroswcd.com/uploads/steam-cs-go-community.htmlsteam cs go community

http://www.lastingpaws.com/uploads/cs-go-aug.htmlcs go aug

http://www.sanborntonnh.org/uploads/cs-go-skins-market.htmlcs go skins market

http://www.dspr-me.org/uploads/steam-market-csgo.htmlsteam market csgo

http://www.dspr-me.org/uploads/cs-go-trade-up.htmlcs go trade up

http://www.silverspringcenter.com/uploads/cs-go-model-skins.htmlcs go model skins

http://www.hplovecraft.com/uploads/cs-go-steam-download-free.htmlcs go steam download free

http://www.colorado-serum.com/uploads/top-cs-go-players.htmltop cs go players

http://www.valleycom.org/uploads/steam-csgo.htmlsteam csgo

http://www.anglingthailand.com/uploads/csgo-best-skins.htmlcsgo best skins

http://www.cambridgegroup.net/uploads/counter-strike-global-offensive-cd.htmlcounter strike global offensive cd

http://www.valleycom.org/uploads/buy-cs-go.htmlbuy cs go

http://www.shapefinancial.com/uploads/cs-go-free-cases.htmlcs go free cases

http://www.dspr-me.org/uploads/steam-market-csgo.htmlsteam market csgo

http://www.binarystarltd.com/uploads/csgo-camo.htmlcsgo camo

http://www.satdw.com/uploads/index.htmlcs global

http://www.pressherenow.com/uploads/buy-skins-cs-go.htmlbuy skins cs go

http://www.factsfinder.com/uploads/csgo-blog.htmlcsgo blog

http://www.zeks.com/uploads/cs-go-community.htmlcs go community

http://www.ptcny.com/uploads/counter-strike-global-offensive-shop.htmlcounter strike global offensive shop

http://www.thesurgicalsideshow.com/uploads/counter-strike-global-offensive-steam-price.htmlcounter strike global offensive steam price

http://www.putnam-sheriff.org/uploads/cheapest-cs-go.htmlcheapest cs go

http://www.doori-nyc.com/uploads/cs-go-skin-sale.htmlcs go skin sale

http://www.ucratx.org/uploads/cs-go-steam-account.htmlcs go steam account

http://www.shapefinancial.com/uploads/p2000-skins.htmlp2000 skins

http://www.freemotionslider.com/uploads/cs-go-steam-download-free.htmlcs go steam download free

http://www.pressherenow.com/uploads/cs-go-all-skins.htmlcs go all skins

http://www.joycreek.com/uploads/cs-go-skin-list.htmlcs go skin list

http://www.kershawleonard.net/uploads/counterstrike-globaloffensive.htmlcounterstrike globaloffensive

http://www.lastingpaws.com/uploads/index.htmlcsgo servers

http://www.greenwoodscharter.org/uploads/cs-go-sale.htmlcs go sale

http://www.socorroswcd.com/uploads/valve-cs-go-servers.htmlvalve cs go servers

http://www.datamology.com/uploads/key-counter-strike-global-offensive.htmlkey counter strike global offensive

http://www.lexingtondistillerydistrict.com/uploads/go-to-update.htmlgo to update

http://www.silverspringcenter.com/uploads/cs-go-item-trade.htmlcs go item trade

http://www.fuscoauctions.com/uploads/counterstrike-cs-go.htmlcounterstrike cs go

http://www.dspr-me.org/uploads/cs-go-trade-up.htmlcs go trade up

http://www.cottonsetcquiltshop.com/uploads/cheap-csgo-key.htmlcheap csgo key

http://www.pci-central.org/uploads/r-cs-go.htmlr cs go

http://www.projectwittenberg.org/uploads/cs-go-skins-for-sale.htmlcs go skins for sale

http://www.cambridgegroup.net/uploads/cs-go-skins-list.htmlcs go skins list

http://www.lexingtondistillerydistrict.com/uploads/how-to-play-cs-go.htmlhow to play cs go

http://www.winegrapebroker.com/uploads/counter-strike-go-key.htmlcounter strike go key

http://www.doori-nyc.com/uploads/buy-counter-strike-go.htmlbuy counter strike go

http://www.lastingpaws.com/uploads/csgo-best-skins.htmlcsgo best skins

http://www.putnam-sheriff.org/uploads/csgo-community-market.htmlcsgo community market

http://www.projectwittenberg.org/uploads/cs-go-skins-value.htmlcs go skins value

http://www.winegrapebroker.com/uploads/ak-skins-cs-go.htmlak skins cs go

http://nteu45.org/uploads/cs-go-player.htmlcs go player

http://www.pci-central.org/uploads/csgo-steam.htmlcsgo steam

http://www.subsurfaceconstructors.com/uploads/cs-go-free-steam-keys.htmlcs go free steam keys

http://www.lastingpaws.com/uploads/p2000-amber-fade.htmlp2000 amber fade

http://www.salemchurch.cc/uploads/cs-global-offensive-price.htmlcs global offensive price

http://www.pci-central.org/uploads/cs-go-prices.htmlcs go prices

http://www.pressherenow.com/uploads/buy-key-cs-go.htmlbuy key cs go

http://www.dspr-me.org/uploads/cs-go-skins-conditions.htmlcs go skins conditions

http://www.datamology.com/uploads/rare-cs-go-skins.htmlrare cs go skins

http://www.calfireslo.org/uploads/cs-go-download-steam-free.htmlcs go download steam free

http://www.salemchurch.cc/uploads/bet-cs-go.htmlbet cs go

http://www.doori-nyc.com/uploads/cs-go-info.htmlcs go info

http://www.endlessvisions.net/uploads/counter-strike-global-offensive-online-buy.htmlcounter strike global offensive online buy

http://www.colorado-serum.com/uploads/cs-go-free.htmlcs go free

http://www.pressherenow.com/uploads/cs-go-skins-guide.htmlcs go skins guide

http://www.winegrapebroker.com/uploads/cs-go-key-sale.htmlcs go key sale

http://www.putnam-sheriff.org/uploads/counter-strike-skin.htmlcounter strike skin

http://www.factsfinder.com/uploads/global-offence.htmlglobal offence

http://www.shapefinancial.com/uploads/cs-go-2014.htmlcs go 2014

http://www.factsfinder.com/uploads/buy-cs-go-steam.htmlbuy cs go steam

http://www.salemchurch.cc/uploads/counter-strike-go-shop.htmlcounter strike go shop

http://www.lexingtondistillerydistrict.com/uploads/cs-go-valve-servers.htmlcs go valve servers

http://www.binarystarltd.com/uploads/csgo-workshop.htmlcsgo workshop

http://www.domadesigns.com/uploads/cs-go-homepage.htmlcs go homepage

http://www.themathpage.com/news/cs-go-steam.htmlcs go steam

http://www.socorroswcd.com/uploads/csgo-games.htmlcsgo games

http://www.datamology.com/uploads/skins-for-csgo.htmlskins for csgo

http://www.cottonsetcquiltshop.com/uploads/cs-go-ak-skins.htmlcs go ak skins

http://www.cambridgegroup.net/uploads/csgo-key-steam.htmlcsgo key steam

http://www.projectwittenberg.org/uploads/steam-keys-cs-go.htmlsteam keys cs go


# Great beat ! I would like to apprentice even as you amend your web site, how can i subscribe for a blog site? The account aided me a applicable deal. I had been tiny bit acquainted of this your broadcast offered vivid transparent concept 2018/07/12 17:13 Great beat ! I would like to apprentice even as yo
Great beat ! I would like to apprentice even as you amend your web site, how can i subscribe for a blog site? The account aided me a applicable deal. I had been tiny bit acquainted of this your broadcast offered vivid transparent concept

# Hey! This post could not be written any better! Reading this post reminds me of my good old room mate! He always kept chatting about this. I will forward this post to him. Fairly certain he will have a good read. Thanks for sharing! 2018/07/29 18:37 Hey! This post could not be written any better! Re
Hey! This post could not be written any better! Reading this post reminds me of my good old room mate! He always kept chatting about this. I will forward this post to him. Fairly certain he will have a good read. Thanks for sharing!

Post Feedback

タイトル
名前
Url:
コメント: