Click here to Skip to main content
15,888,527 members
Home / Discussions / C#
   

C#

 
AnswerRe: Code for detecting all the firewalls installed on a system Pin
Simon P Stevens16-Jun-08 1:57
Simon P Stevens16-Jun-08 1:57 
QuestionSwitching between forms Pin
Christian Flutcher15-Jun-08 20:10
Christian Flutcher15-Jun-08 20:10 
AnswerRe: Switching between forms Pin
Simon P Stevens16-Jun-08 2:00
Simon P Stevens16-Jun-08 2:00 
Questiondefault constructor? Pin
George_George15-Jun-08 19:25
George_George15-Jun-08 19:25 
AnswerRe: default constructor? Pin
S. Senthil Kumar15-Jun-08 19:31
S. Senthil Kumar15-Jun-08 19:31 
GeneralRe: default constructor? Pin
George_George15-Jun-08 19:36
George_George15-Jun-08 19:36 
GeneralRe: default constructor? Pin
Christian Flutcher15-Jun-08 20:13
Christian Flutcher15-Jun-08 20:13 
GeneralRe: default constructor? Pin
S. Senthil Kumar15-Jun-08 20:40
S. Senthil Kumar15-Jun-08 20:40 
ForumExpertOnLine wrote:
George_George wrote:
For value type, even if we provide a customized constructor, there is also the default one (co-exist with customized one)?

NO


Wrong - the default constructor exists, whether you create a overloaded one or not.

struct S
{
    int x;
    public S(int x)
    {
        this.x = x;
    }

    public int X
    {
        get { return x; }
    }
}
class Program
{
    static void Main(string[] args)
    {
        S s = new S();
        Console.WriteLine(s.X);
    }
}


Regards
Senthil [MVP - Visual C#]
_____________________________
My Blog | My Articles | My Flickr | WinMacro

GeneralRe: default constructor? Pin
Christian Flutcher15-Jun-08 20:44
Christian Flutcher15-Jun-08 20:44 
GeneralRe: default constructor? Pin
George_George15-Jun-08 20:45
George_George15-Jun-08 20:45 
GeneralRe: default constructor? Pin
Guffa15-Jun-08 21:39
Guffa15-Jun-08 21:39 
GeneralRe: default constructor? Pin
George_George15-Jun-08 21:48
George_George15-Jun-08 21:48 
GeneralRe: default constructor? Pin
Guffa15-Jun-08 22:05
Guffa15-Jun-08 22:05 
GeneralRe: default constructor? Pin
George_George15-Jun-08 22:17
George_George15-Jun-08 22:17 
GeneralRe: default constructor? Pin
Guffa16-Jun-08 1:12
Guffa16-Jun-08 1:12 
GeneralRe: default constructor? Pin
George_George16-Jun-08 22:25
George_George16-Jun-08 22:25 
GeneralRe: default constructor? Pin
S. Senthil Kumar15-Jun-08 23:11
S. Senthil Kumar15-Jun-08 23:11 
GeneralRe: default constructor? Pin
Guffa16-Jun-08 1:03
Guffa16-Jun-08 1:03 
GeneralRe: default constructor? Pin
S. Senthil Kumar15-Jun-08 20:45
S. Senthil Kumar15-Jun-08 20:45 
GeneralRe: default constructor? Pin
George_George15-Jun-08 20:47
George_George15-Jun-08 20:47 
GeneralRe: default constructor? Pin
S. Senthil Kumar15-Jun-08 20:50
S. Senthil Kumar15-Jun-08 20:50 
GeneralRe: default constructor? Pin
George_George15-Jun-08 21:01
George_George15-Jun-08 21:01 
GeneralRe: default constructor? Pin
Christian Flutcher15-Jun-08 21:09
Christian Flutcher15-Jun-08 21:09 
GeneralRe: default constructor? Pin
George_George15-Jun-08 21:25
George_George15-Jun-08 21:25 
GeneralRe: default constructor? Pin
S. Senthil Kumar15-Jun-08 21:11
S. Senthil Kumar15-Jun-08 21:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.