[ZS2] [mapguide-users] MapGuide Programming using C#, need help, please

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Tue Feb 10 06:49:15 EST 2009


This is the first hit on google when searching for CS0266:
http://msdn.microsoft.com/en-us/library/5z8wb9e4(VS.80).aspx

Regards, Kenneth Skovhede, GEOGRAF A/S



staniz skrev:
> I am using MGE Server and Studio 2008, windows XP and IIS 5.1. I downloaded
> sample code from
> http://download.autodesk.com/media/adn/DevTV_%20Introduction_to_MGE_Programming/SampleCode.zip
> these code is recommended for MGE2007, but I think its also work for
> MGE2008.
> I followed all the instruction in video, and ran the default.aspx. Its
> worked by but When I was trying to run the Query.aspx and execute the
> DisplayQueryResult.aspx I got the following error:
>
> ----
> Compiler Error Message : CS0266:
> cannot implicitly convert type
> `OSGeo.Mapguide.MgLayerBase` to
> `OSGeo.Mapguide.MgLayer`. An explicit 
> conversion exist (are you missing a cast?)
>
> Source code:
> Line 58:  MgLayer layer =map.Getlayer().GetItem("Parcels");
>
> .Net framwork Version:2.0.50727.42
> ----
>
> please help to solve this problem...
> thanks is advance.
>
> staniz
>
>
>
>
>
>   


More information about the mapguide-users mailing list