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

Posted on 2011-10-12
Last Modified: 2012-06-27
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.");
    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,

    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

Question by:ElPollo123

    Accepted Solution

    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!!

    Author Closing Comment

    I found the answer on my own.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
    Article by: Ivo
    C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now