🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.pl.comp.lang.csharp
Article #10072

const

#10072
From: Paweł Nowak
Date: Wed, 16 Nov 2005 14:47
27 lines
1449 bytes
Witam
Własnie ucze sie C# i mam pewien problem.
Nie  wiem dlaczego , czy tak moze ma byc ale nie moge odczytac wartości ze
stałej.
Gdy usune "const" wszystko działa. Jak to jest z tymi stałymi w C#.

using System;

namespace Example
{
public class COsoba
{
    public const int test = 10;
}

public class CMain
{
    public static void Main()
    {
        COsoba o = new COsoba();
        Console.WriteLine(o.test);
    }

}
}

Pozdrawiam 
Technical Details
Message-ID: <dlfgpp$7b$1@atlantis.news.tpi.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
From: Paweł Nowak <blum1@gazeta.pl>
Newsgroups: alt.pl.comp.lang.csharp
Subject: const
Date: Wed, 16 Nov 2005 15:47:06 +0100
Organization: tp.internet - http://www.tpi.pl/
Lines: 29
Message-ID: <dlfgpp$7b$1@atlantis.news.tpi.pl>
NNTP-Posting-Host: bjo241.neoplus.adsl.tpnet.pl
X-Trace: atlantis.news.tpi.pl 1132152442 235 83.28.156.241 (16 Nov 2005 14:47:22 GMT)
X-Complaints-To: usenet@tpi.pl
NNTP-Posting-Date: Wed, 16 Nov 2005 14:47:22 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-Antivirus: avast! (VPS 0546-3, 2005-11-16), Outbound message
X-Antivirus-Status: Clean
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit