Wrox Programmer Forums
|
Visual Studio 2005 For discussing Visual Studio 2005. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Studio 2005 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 November 15th, 2010, 09:14 AM
Registered User
 
Join Date: Nov 2010
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Sir , After i proceed with your hint,

i mean after i change the code like

foreach (System.Collections.Generic.List<GMap.NET.Point> tilePoint in Core.tileDrawingList)

its giving me a Error like

[Error 1 Cannot convert type 'GMap.NET.Point' to 'System.Collections.Generic.List<GMap.NET.Point>'
]
 
Old November 15th, 2010, 09:34 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

tileDrawingList returns a List<GMap.NET.Point>, so each item in the list is a GMap.NET.Point, not a List<GMap.NET.Point> itself. So instead of var, use GMap.NET.Point.

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
maanikmca (November 16th, 2010)
 
Old November 16th, 2010, 01:10 AM
Registered User
 
Join Date: Nov 2010
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Thanks Alot Sir,

Thats works :)
 
Old November 16th, 2010, 01:56 AM
Registered User
 
Join Date: Nov 2010
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Good Morning Sir,

now am facing another trouble with .net 2

if(opt.Contains("http://"))

its trigger a error as

Error 1 'string' does not contain a definition for 'Contains)

what the error might be?
 
Old November 16th, 2010, 04:27 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

string.Contains is not supported in the Compact Framework 2.0. To check out this stuff for other problems you run into, first take a look at the MSDN documentation:

http://msdn.microsoft.com/en-US/libr...(v=VS.80).aspx

Each member supported by CF has a tiny mobile icon. For Contains, there's none. Then Google will tell you what to do next:

http://www.google.com/#hl=en&source=...ai=&fp=1&cad=b

The trick is to use IndexOf instead which returns -1 when the string is not found.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old November 16th, 2010, 06:06 AM
Registered User
 
Join Date: Nov 2010
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Default

opt.IndexOf ("http://")

Error 1 Cannot implicitly convert type 'int' to 'bool'

this is the error am getting while using indexof in coding Sir?
 
Old November 16th, 2010, 06:17 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Take another look at the MSDN documentation I linked to; IndexOf returns in integer (-1 when the string is not found), and not a bool as Contains does....

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
var,text ,..... angelboy SQL Language 2 May 29th, 2007 11:37 AM
"Out of scope" var??? yankleber XSLT 2 March 31st, 2007 03:53 AM
Give me one real time application of transient Var pandian Java Basics 0 October 5th, 2006 03:24 PM
Using a var into the name of another var or field. guizero Access VBA 3 May 30th, 2006 03:47 PM
Dissapearing VAR topshed Classic ASP Databases 5 June 3rd, 2005 01:34 PM





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