Results 1 to 7 of 7

Thread: [RESOLVED] C# equivalent of Mybase.New()?

  1. #1

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Resolved [RESOLVED] C# equivalent of Mybase.New()?

    What is the C# equivalent of VB.Net's

    VB Code:
    1. MyBase.New(...)

    ??

    I'm inheriting from ApplicationException and the normal practice in VB.net is to call the the base class constructor from within the derived class's constructor.

    At the moment I have this, where I have shown the line I want to change...

    Code:
    public class SudokuGridIllegalException : ApplicationException 
    {
    	//constructor of my derived class
    	public SudokuGridIllegalException(String message)
    	{
    		// call the base's constructor
    		/* wrong */ mybase.New(message);
    	}
    }
    Is this even the way you do this in C#? *noobz*
    I don't live here any more.

  2. #2

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: [RESOLVED] C# equivalent of Mybase.New()?

    Never mind, sorted it out...

    public class SudokuGridIllegalException : ApplicationException
    {
    public SudokuGridIllegalException(String message) : base(message)
    {
    }
    }
    I don't live here any more.

  3. #3
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: [RESOLVED] C# equivalent of Mybase.New()?

    Hmmm...how did you find that out...hmmm...

  4. #4

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: [RESOLVED] C# equivalent of Mybase.New()?

    Some idiot on MSN just told me.

  5. #5
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Re: [RESOLVED] C# equivalent of Mybase.New()?

    what are you doing learning C# you moron
    take a look at my thread
    http://vbforums.com/showthread.php?t=344688
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  6. #6

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: [RESOLVED] C# equivalent of Mybase.New()?

    You don't like C#?

  7. #7
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Re: [RESOLVED] C# equivalent of Mybase.New()?

    Quote Originally Posted by wossname
    You don't like C#?
    i do but all your c# are belong to me
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width