Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 2008 > BOOK: Beginning Microsoft Visual C# 2008 ISBN: 978-0-470-19135-4
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
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.
Reply With Quote
  #2 (permalink)  
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
Reply With Quote
  #3 (permalink)  
Old February 19th, 2014, 12: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
Reply With Quote
  #4 (permalink)  
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; }
     .
     .
     .
}
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 01:05 PM
Chapter 19 johanyu BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 3 November 12th, 2007 09: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



All times are GMT -4. The time now is 11:46 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.