Article View: alt.pl.comp.lang.csharp
Article #10071const
From: jaju
Date: Wed, 16 Nov 2005 14:37
Date: Wed, 16 Nov 2005 14:37
27 lines
1484 bytes
1484 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:
<dlfg8f$q68$1@atlantis.news.tpi.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.nask.pl!news.nask.org.pl!newsfeed.tpinternet.pl!nemesis.news.tpi.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.nask.pl!news.nask.org.pl!newsfeed.tpinternet.pl!nemesis.news.tpi.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail From: "jaju" <jaju@poczta.onet.pl> Newsgroups: alt.pl.comp.lang.csharp Subject: const Date: Wed, 16 Nov 2005 15:37:51 +0100 Organization: tp.internet - http://www.tpi.pl/ Lines: 29 Message-ID: <dlfg8f$q68$1@atlantis.news.tpi.pl> NNTP-Posting-Host: bjo241.neoplus.adsl.tpnet.pl X-Trace: atlantis.news.tpi.pl 1132151887 26824 83.28.156.241 (16 Nov 2005 14:38:07 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: Wed, 16 Nov 2005 14:38:07 +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