AnsweredAssumed Answered

How to cast?

Question asked by shaningesri on Sep 24, 2013
Latest reply on Sep 24, 2013 by shaningesri
Referrring to the code at
http://edndoc.esri.com/arcobjects/9.0/Samples/Linear_Referencing/Arcmap/FindPointRouteLocation.htm
  Dim pRtLocName As IRouteLocatorName
  Set pRtLocName = New RouteMeasureLocatorName
I tried to do like that
  ESRI.ArcGIS.Geodatabase.IRouteLocatorName pRtLocatorName = new ESRI.ArcGIS.Location.RouteMeasureLocatorName();
but got the compile error:
Cannot implicitly convert type 'ESRI.ArcGIS.Location.RouteMeasureLocatorName' to 'ESRI.ArcGIS.Geodatabase.IRouteLocatorName'. An explicit conversion exists (are you missing a cast?)
I tried to cast but not successful.  How to cast the variable here?  Thanks for your hint.

Outcomes