Wrox Programmer Forums
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 13th, 2004, 04:20 PM
Registered User
 
Join Date: Oct 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default VB newbie needs help

does anyone know how to fix this error? i have been on it for hours and im pretty sure that its a simple fix.

Method 'New' has multiple definitions with identical signatures.

In addition to getting this error VB also asks me for an identifier.

don't know if you need it but here's segment of code that i have:

Public Sub New()
        ' Initialize the DateTimePicker control instances. The arrival date is
        ' today and the checkout date is tommorrow. Also set the maximum arrival
        'date to today.
        'set maximumarrival date to 180 days from today. set min checkout date
        'to tommorrow.
        'set max checkout date to 180 days from today.
        dtpArrivalDate.Value = Today
        dtpArrivalDate.MinDate = Today
        dtpArrivalDate.MaxDate = Today.AddDays(180)
        dtpCheckoutDate.Value = Today.AddDays(1)
        dtpCheckoutDate.MinDate = Today.AddDays(1)
        dtpCheckoutDate.MaxDate = Today.AddDays(180)


        ' Initialize the Rollaway check box to unchecked.
        chkAdditionalRollawayBed.CheckState = CheckState.Unchecked

        ' Initialize the button group so that the Deluxe button is selected.
        radDeluxe.Checked = True

        ' Initialize the Number of Guests numeric up down control.
        nudNumberOfGuests.Value = 4

    End Sub
 
Old October 13th, 2004, 05:25 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Do you have multiple "New" methods?

J
 
Old June 11th, 2007, 10:35 AM
Registered User
 
Join Date: Jun 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i have a similar problem

i have multiple 'new' methods. some have a different parameter passed through them...

...but i also have 3 separate 'new' method subroutines all with the same paramater passed through them. 2/3 of the subroutines come up with the exact same error about the 'new' method.
ie

Sub New(parameter as parameter)
sub1(parameter)
end sub

Sub New(parameter as parameter)
sub2(parameter)
end sub

Sub New(parameter as parameter)
sub3(parameter)
end sub

(and an error comes up in sub 1 and 3)
and i have changed this to:

Sub New(parameter as parameter)
sub1(parameter)
sub2(parameter)
sub3(parameter)
end sub

but it has not worked. I have also changed the parameter names in each subroutine btu this has nto worked either.

any ideas?




 
Old June 11th, 2007, 10:40 AM
Registered User
 
Join Date: Jun 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

nevermind,
i was inputting uneccessary methods in the class constructor which lead to this error






Similar Threads
Thread Thread Starter Forum Replies Last Post
[newbie] Please help me with Compiling in VB 2005 ryan.webb BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 3 April 11th, 2007 06:35 AM
VB basic stuff for newbie blotcho Beginning VB 6 5 August 19th, 2006 03:05 AM
Good book for VB.NET newbie Dhodie VB.NET 2002/2003 Basics 4 April 7th, 2006 04:32 AM
Newbie: Calling a VB doc from ASP.NET kwilliams Classic ASP Basics 2 August 31st, 2005 09:10 AM
newbie vb.net question dib VS.NET 2002/2003 4 February 5th, 2004 04:46 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.