c# - Does not contain definition or extension method -


i getting next error when try build:

does not contain definition or extension method

i have class this:

[serializable]     public class jobfile {     private fileinfo mfileinfo;     private string mjobnumber = string.empty;     private string mbasejobnumber = string.empty;     private guid mdocumenttytpeid = guid.empty;      public string documenttypedescription     {                 {             string description;                documenttype doctype;             doctype = documenttype.getdoctype(documenttypecode);                       if (doctype.code == null)                                     description = "unknown";             else                                   description = doctype.description;                                return description;         }     }      public guid documenttypeid     {                 {                           documenttype doctype;             doctype = documenttype.getdoctype(documenttypecode);             if (doctype.code == null)                 mdocumenttytpeid = guid.empty;                               else                 mdocumenttytpeid = doctype.id;             return mdocumenttytpeid;         }     } 

now trying value of documenttypeid in other class so:

foreach (fileinfo fi in files) {     jobfile jf = null;     jf = new jobfile(ref fi);     f.documenttypeid = jf.documenttypeid; //<-- error here } 

does know wrong , how fix it? thanks.

the error message clear what's wrong. you're trying use property doesn't exist, , seeing how error occuring on line:

f.documenttypeid = jf.documenttypeid; 

it 1 of 2 things:

  1. f not exist
  2. f.documenttypeid not exist.
  3. jf.documenttypeid not exist

honestly, check make sure f.documenttypeid not supposed f.documenttypeid. c# picky things that, , small mistake cause error you're receiving.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -