Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET 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 May 4th, 2007, 06:05 AM
Registered User
 
Join Date: May 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default cannot implecitly convery type bool to string

hi
From a pipe separated file i want to read first set of data before first pipe. I m able to do this bt data from all the lines should be read.. hw to loop this. I tried bt getting an error cannot convert type bool to string and string to bool.

 
Old May 8th, 2007, 04:53 AM
Authorized User
 
Join Date: Dec 2004
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to DZukiewicz
Default

What value are you trying to convert to a bool, or a string? bool.Parse() with strings will only use "true" and "false" (I'm not sure about casing) and true.ToString() will be "true".

You may have to write a method to do it for you, which should not be hard to do.

Hope this helps,

Dominic
 
Old May 8th, 2007, 06:29 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

My guess, without seeing any source code and assuming you are using C# is that you are confusing = with == and vice versa inside some sort of control statement.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot implecitly convert type bool to string vaidyapragati General .NET 1 May 4th, 2007 09:10 PM
cant implicitly convert type int to bool muskaanbajaj BOOK: ASP.NET Website Programming Problem-Design-Solution 3 November 19th, 2005 04:57 PM
Cannot implicitly convert type int to bool muskaanbajaj General .NET 12 May 5th, 2005 03:57 AM
Can't convert type 'bool' to 'int' Gjerstad BOOK: ASP.NET Website Programming Problem-Design-Solution 2 July 9th, 2003 10:33 AM





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