[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[DotGNU]Strange message error

From: brunoacf
Subject: [DotGNU]Strange message error
Date: Thu, 23 Oct 2003 16:34:49 -0200

Hi all.

Look at the following (buggy) C# code:

using System;

class Sample {

    public Sample ( ) { }

    public SomeFunction ( ) {       //
ERROR: Function must have a value type


    public static void Main ( ) {
        Console.WriteLine ("TEST");


If a try to compile with cscc, it
returns this message:

cscc sample.cs
sample.cs:7: constructor name does not
match class name
sample.cs:9: declaration of `.ctor'
conflicts with an existing member

The compiler thinks that
SomeFunction() is a constructor
because it don't have a return type.

Is this a bug in the compiler?


Acabe com aquelas janelinhas que pulam na sua tela.
AntiPop-up UOL - É grátis!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]