Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio
This is the forum to discuss the Wrox book ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solution by Vincent Varallo; ISBN: 9780470396865
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 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
  #1 (permalink)  
Old November 20th, 2009, 12:23 PM
Authorized User
 
Join Date: Nov 2009
Posts: 14
Thanks: 4
Thanked 0 Times in 0 Posts
Default Error CS0508 - Chapter 6

Hi,

I have made it through to Chapter 6 a little scarred but still plodding on. I get the above error when compiling and it relates to ErrorPage.aspx.cs and states that in line 31 'ErrorPage.CapabilityNames()': return type must be 'string[]' to match overridden member 'BasePage.CapabilityNames()'

If I remove the [] after string on line 51 of BasePage.cs, public abstract string[] CapabilityNames();

I get that it cannot convert type 'char' to 'string'

All the other projects build ok it;s just the UI I am having issues with at the moment.

Help greatly received...I must finsih this book/framework soon.

Gilbo
  #2 (permalink)  
Old November 20th, 2009, 04:48 PM
Authorized User
 
Join Date: Apr 2009
Posts: 41
Thanks: 1
Thanked 2 Times in 2 Posts
Default

Take a look at what the method code is returning - it should be returning a string [], otherwise you'll continue to get errors compiling.

In other words, if your method code ends with return xyz, and xyz is anything other than a string [], it won't work. As the compiler said, it has to be string [] to match the method it's overriding.
Tim
The Following User Says Thank You to Corsair For This Useful Post:
Gilbo79 (November 24th, 2009)


Similar Threads
Thread Thread Starter Forum Replies Last Post
error with chapter 7 busteronline BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 15 August 21st, 2008 03:22 PM
error with chapter 7 jdz66 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 August 21st, 2006 05:19 PM
Parse error in error handler (Chapter 8) Funky Monk BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 August 6th, 2004 08:59 AM





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