c# - Error suggests I'm missing a using directive or assembly reference, but I'm not.... -
I'm new enough to work with multiple projects in the solution. Two of my projects are: AutoPoster. Droid and AutoPoster.Core . I have an adapter class in AutoPoster.Droid which gives LocationInfo context in AutoPoster.Core. I am getting this error now and it is not sure why: the type or namespace 'core' could not be found (are not you forgetting the reference to use or the reference to the coalition?) Here's my code: You can not use such namespaces. You can not specify only one part of the namespace, since or you need to fully classname be qualified: Edit: And of course, you must have from one project to another reference ...
using the system; Using System.Collections.Generic; Using System.Linq; Using Android. App; Using Android. See; Using Android.Widget; Namespace Autopostor.Dyrid Adapter {public class postInfoAdapter: Base adapter & lt; Core.Model.Location & gt; {Private redone activity activity; Public listing & lt; Core.Model.LocationInfo & gt; Location information (get); Private set; } // Getting the error here: Public PostInfoAdapter (Activity reference, IEnumerable & lt; Core.Model.LocationInfo & gt; localInfo) // Get the error here {locationInformation = New list & lt; Core.Model.LocationInfo & gt; (LocalInfo); // error is getting activity = reference; } Public override int calculation {get {return LocationInformation.Count; }} Public override Core.Model.LocationInfo this [int position] // Getting an error here {{Change location location [status]; }} Public override long GetItemId (status of int) {return status; } View public override GetView (integer position, seeviewview, ViewGroup parent) {var view = convertView ?? Activity.LayoutInflater.Inflate (Android.Resource.Layout.SimpleListItem2, blank); Var local info = location information [status]; Var name = view.FindViewById & lt; TextView & gt; (Android.Resource.Id.Text1); Name. Text =! String.isial olive (local infofill) LocalInfo.FullName: localInfo.ShortName; Var rxcui = view.FindViewById & lt; TextView & gt; (Android.Resource.Id.Text2); Rxcui.Text =! String.IsNullOrEmpty (localInfo.FullName)? LocalInfo.ShortName: String.Empty; Return view; } Public Zero reload data (IEnumerable & lt; Core.Model.LocationInfo & gt; location information) // Getting error here {locationInformation.Clear (); LocationInformation.AddRange (locationInformation); NotifyDataSetChanged (); }}}}
autopter . You must either use AutoPoster.Core.Model by using
for
direct
AutoPoster.Core.Model :
; Namespace Autopostor.Dyrid Adapter {public class postInfoAdapter: Bas adapter & lt; Placeinfo & gt; {...}}
Namespace AutoPoster .Droid.Adapters {Public Class PostInfoAdapter: BidEdapter & Lt; Autopaster.core.modelocationInfo & gt; Edit {...}}
Comments
Post a Comment