Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning Microsoft Visual C# 2008 ISBN: 978-0-470-19135-4
This is the forum to discuss the Wrox book Beginning Microsoft Visual C# 2008 by Karli Watson, Christian Nagel, Jacob Hammer Pedersen, Jon D. Reid, Morgan Skinner, Eric White; ISBN: 9780470191354
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Microsoft Visual C# 2008 ISBN: 978-0-470-19135-4 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 September 2nd, 2010, 11:19 AM
Registered User
 
Join Date: Sep 2010
Location: Perth Australia
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Default Build Error Chapter 19 RegistrationInformation

I seemed to have either entered incorrectly or misinterpreted instructions

public class RegistrationInformation
{
public RegistrationInformation()
{

}
public struct RegistrationInformation
{
public string FirstName { get; set; }
public string LastName { get; set; }
public string Email { get; set; }
public string SelectedEvent { get; set; }
}
}

this yields an error on the struct "member names cannot be the same as their enclosing type."

Help would be appreciated.Thanks.
 
Old September 2nd, 2010, 11:27 AM
Registered User
 
Join Date: Sep 2010
Location: Perth Australia
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Default Sorry

Sorry guys I should have checked the download code first.

I realise now it was supposed to be just the struct.
Thanks
 
Old February 19th, 2014, 01:02 AM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2014
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,I meet the same problem,I want to know how you solve it
 
Old March 25th, 2014, 01:09 AM
Friend of Wrox
Points: 528, Level: 8
Points: 528, Level: 8 Points: 528, Level: 8 Points: 528, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2014
Posts: 136
Thanks: 1
Thanked 10 Times in 10 Posts
Default

Well Antiaaa, you have 1 of 2 choices to resolve this issue
1) define a class named RegistrationInformation
2) define a struct named RegistrationInformation

you cant have both either in the same namespace or defined with each other.

Code:
public struct RegistrationInformation
{
     public string FirstName { get; set; }
     .
     .
     .
}
or
Code:
public class RegistrationInformation
{
     public string FirstName { get; set; }
     .
     .
     .
}




Similar Threads
Thread Thread Starter Forum Replies Last Post
StringHelpers in Chapter 8 gives a build error tdewey BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 2 May 2nd, 2009 07:54 PM
Chapter 19 xml error flashmanTom Visual Basic 2005 Basics 0 February 9th, 2008 02:05 PM
Chapter 19 johanyu BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 3 November 12th, 2007 10:50 AM
C# - Chapter 3 Build Error TJ BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 July 29th, 2006 03:43 PM
Chapter 19 error of: Cannot find bean: "org.apache keeotee BOOK: Beginning JavaServer Pages 1 April 23rd, 2006 08:17 AM





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