[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 205
  • Last Modified:

'jobFile' does not contain a definition for 'DocumentTypeID' and no extension method 'DocumentTypeID' accepting a first argument of type 'jobFile' could be found

Hello experts,
Here is my problem.  I have a class file called jobfile.cs (in the code section below)
And I have another class file that is trying to use some of the properties of jobfile.cs

Like so:  
    JobFile jf = null;
     FileInfo c = fi;
     jf = new JobFile(ref c);
     if (jf.DocumentTypeDescription == "Unknown") {  //this works fine
            throw new InvalidDataException("Cannot determine document code.");
   etc....
    f.DocumentTypeId = jf.DocumentTypeID;   //i get the error here
     


But I keep getting the error in the title.  But I do have a declaration of Documenttypeid, I just don't understand what this error is and how to fix it.
Please Help,


[Serializable()]
    public class JobFile {
        #region " Business Methods "

     // class level variables
        private FileInfo mFileInfo;
        private string mJobNumber = string.Empty;
        private string mBaseJobNumber = string.Empty;
        private Guid mDocumentTytpeid = Guid.Empty;

       public string DocumentTypeDescription {
            get {
                string description;   
               DocumentType DocType;
                DocType = DocumentType.GetDocType(DocumentTypeCode);
          
                if (DocType.Code == null) {
                    
                    description = "Unknown";
                   
                } else {
                  
                   description = DocType.Description;
                   
                }                
                return description;
            }
        }

        public Guid DocumentTypeID {
            get {
                //Guid docid;
                DocumentType DocType;
                DocType = DocumentType.GetDocType(DocumentTypeCode);

                if (DocType.Code == null) {

                    mDocumentTytpeid = Guid.Empty;
                } else {

                    mDocumentTytpeid = DocType.Id;
                }
                return mDocumentTytpeid;
            }
        }

Open in new window

0
ElPollo123
Asked:
ElPollo123
  • 2
1 Solution
 
ElPollo123Author Commented:
Sorry to bother everyone with this. I found the problem, and it was my own stupidity. There is nothing wrong with the code itself the problem was my project had an old dll reference. So doing a build on my project would not re-build the dll or Library i was referencing. Lesson to learn: Always build in the proper order!!
0
 
ElPollo123Author Commented:
I found the answer on my own.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now