Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 757869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:24:48+00:00 2026-05-14T15:24:48+00:00

My code gets an error saying: ‘Eagle_Eye_Class_Finder.GetSchedule’ does not contain a definition for ‘GetDataFromNumber’

  • 0

My code gets an error saying:

‘Eagle_Eye_Class_Finder.GetSchedule’
does not contain a definition for
‘GetDataFromNumber’ and no extension
method ‘GetDataFromNumber’.

using System;
using System.IO;
using System.Data;
using System.Text;
using System.Drawing;
using System.Data.OleDb;
using System.Collections;
using System.Windows.Forms;
using System.ComponentModel;
using System.Drawing.Printing;
using System.Collections.Generic;

namespace Eagle_Eye_Class_Finder
{

    /// This form is the entry form, it is the first form the user will see when the app is run.
    /// 

    public class Form1 : System.Windows.Forms.Form
    {
        private System.Windows.Forms.TextBox textBox1;
        private System.Windows.Forms.ProgressBar progressBar1;
        private System.Windows.Forms.PictureBox pictureBox1;
        private System.Windows.Forms.Button button2;
        private System.Windows.Forms.DateTimePicker dateTimePicker1;
        private IContainer components;
        private Timer timer1;
        private BindingSource form1BindingSource;
        public static Form Mainform = null;

        // creates new instance of second form
        YOURCLASSSCHEDULE SecondForm = new YOURCLASSSCHEDULE();

        public Form1()
        {
            InitializeComponent();

            // TODO: Add any constructor code after InitializeComponent call

        }

        /// Clean up any resources being used.

        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (components != null)
                {
                    components.Dispose();
                }
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
            this.textBox1 = new System.Windows.Forms.TextBox();
            this.progressBar1 = new System.Windows.Forms.ProgressBar();
            this.pictureBox1 = new System.Windows.Forms.PictureBox();
            this.button2 = new System.Windows.Forms.Button();
            this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
            this.timer1 = new System.Windows.Forms.Timer(this.components);
            this.form1BindingSource = new System.Windows.Forms.BindingSource(this.components);
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.form1BindingSource)).BeginInit();
            this.SuspendLayout();
            // 
            // textBox1
            // 
            this.textBox1.BackColor = System.Drawing.SystemColors.ActiveCaption;
            this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.form1BindingSource, "Text", true, System.Windows.Forms.DataSourceUpdateMode.OnValidation, null, "900456317"));
            this.textBox1.Location = new System.Drawing.Point(328, 280);
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(208, 20);
            this.textBox1.TabIndex = 2;
            this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
            // 
            // progressBar1
            // 
            this.progressBar1.Location = new System.Drawing.Point(258, 410);
            this.progressBar1.MarqueeAnimationSpeed = 10;
            this.progressBar1.Name = "progressBar1";
            this.progressBar1.Size = new System.Drawing.Size(344, 8);
            this.progressBar1.TabIndex = 3;
            this.progressBar1.Click += new System.EventHandler(this.progressBar1_Click);
            // 
            // pictureBox1
            // 
            this.pictureBox1.BackColor = System.Drawing.SystemColors.ControlLightLight;
            this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
            this.pictureBox1.Location = new System.Drawing.Point(680, 400);
            this.pictureBox1.Name = "pictureBox1";
            this.pictureBox1.Size = new System.Drawing.Size(120, 112);
            this.pictureBox1.TabIndex = 4;
            this.pictureBox1.TabStop = false;
            this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
            // 
            // button2
            // 
            this.button2.Font = new System.Drawing.Font("Mistral", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.button2.Image = ((System.Drawing.Image)(resources.GetObject("button2.Image")));
            this.button2.Location = new System.Drawing.Point(699, 442);
            this.button2.Name = "button2";
            this.button2.Size = new System.Drawing.Size(78, 28);
            this.button2.TabIndex = 5;
            this.button2.Text = "OK";
            this.button2.Click += new System.EventHandler(this.button2_Click);
            // 
            // dateTimePicker1
            // 
            this.dateTimePicker1.Location = new System.Drawing.Point(336, 104);
            this.dateTimePicker1.Name = "dateTimePicker1";
            this.dateTimePicker1.Size = new System.Drawing.Size(200, 20);
            this.dateTimePicker1.TabIndex = 6;
            this.dateTimePicker1.ValueChanged += new System.EventHandler(this.dateTimePicker1_ValueChanged);
            // 
            // timer1
            // 
            this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
            // 
            // form1BindingSource
            // 
            this.form1BindingSource.DataSource = typeof(Eagle_Eye_Class_Finder.Form1);
            // 
            // Form1
            // 
            this.AcceptButton = this.button2;
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
            this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.ClientSize = new System.Drawing.Size(856, 556);
            this.Controls.Add(this.dateTimePicker1);
            this.Controls.Add(this.button2);
            this.Controls.Add(this.pictureBox1);
            this.Controls.Add(this.progressBar1);
            this.Controls.Add(this.textBox1);
            this.Name = "Form1";
            this.Text = "Eagle Eye Class Finder";
            this.Load += new System.EventHandler(this.Form1_Load);
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.form1BindingSource)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

        }
        #endregion

        /// The main entry point for the application.

        [STAThread]
        static void Main()
        {
            Application.Run(new Form1());

        }

        public void Form1_Load(object sender, System.EventArgs e)
        {


        }

        public void textBox1_TextChanged(object sender, System.EventArgs e)
        {
            //allows only numbers to be entered in textbox
            string Str = textBox1.Text.Trim();
            double Num;
            bool isNum = double.TryParse(Str, out Num);

            if (isNum)

                Console.ReadLine();

            else
                MessageBox.Show("Enter A Valid ID Number!");                              

        }

        public void button2_Click(object sender, System.EventArgs e)
        {
            string text = textBox1.Text;
            Mainform = this;

            this.Hide();

            GetSchedule myScheduleFinder = new GetSchedule();
            string result = myScheduleFinder.GetDataFromNumber(text);<<<-----MY PROBLEM

            if (!string.IsNullOrEmpty(result))
            {
                MessageBox.Show(result);
            }
            else
            {
                MessageBox.Show("Enter A Valid ID Number!");
            }
        }


        public void dateTimePicker1_ValueChanged(object sender, System.EventArgs e)
        {

        }

        public void pictureBox1_Click(object sender, System.EventArgs e)
        {

        }

        public void progressBar1_Click(object sender, EventArgs e)
        {
            //this.progressBar1 = new System.progressBar1();
            //progressBar1.Maximum = 200;
            //progressBar1.Minimum = 0;
            //progressBar1.Step = 20;

        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            //if (progressBar1.Value >= 200 )
            //{
            //progressBar1.Value = 0;
            //}
            //return;
            //}

            //progressBar1.Value != 20;

        }

        }

    }

my Get schedule class:

using System;
using System.IO;
using System.Data;
using System.Text;
using System.Drawing;
using System.Data.OleDb;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Drawing.Printing;
using System.Collections.Generic;

namespace Eagle_Eye_Class_Finder
{

public class GetSchedule
{
    public GetSchedule()
    {
        IDnumber[] IDnumbers = new IDnumber[3];
        IDnumbers[0] = new IDnumber() { Name = "Joshua Banks", ID = "900456317", year = "Senior", class1 = "TEET 4090", class2 = "TEET 3020", class3 = "TEET 3090", class4 = "TEET 4290" };
        IDnumbers[1] = new IDnumber() { Name = "Sean Ward", ID = "900456318", year = "Junior", class1 = "ENGNR 4090", class2 = "ENGNR 3020", class3 = "ENGNR 3090", class4 = "ENGNR 4290" };
        IDnumbers[2] = new IDnumber() { Name = "Terrell Johnson", ID = "900456319", year = "Sophomore", class1 = "BUS 4090", class2 = "BUS 3020", class3 = "BUS 3090", class4 = "BUS 4290" };

    }
    public class IDnumber
    {
        public string Name { get; set; }
        public string ID { get; set; }
        public string year { get; set; }
        public string class1 { get; set; }
        public string class2 { get; set; }
        public string class3 { get; set; }
        public string class4 { get; set; }


       public static void ProcessNumber(IDnumber myNum)
            {
                StringBuilder myData = new StringBuilder();
                myData.AppendLine(myNum.Name);   
                myData.AppendLine(": ");
                myData.AppendLine(myNum.ID);
                myData.AppendLine(myNum.year);
                myData.AppendLine(myNum.class1);
                myData.AppendLine(myNum.class2);
                myData.AppendLine(myNum.class3);
                myData.AppendLine(myNum.class4);  
                MessageBox.Show(myData.ToString());
            }

        public string GetDataFromNumber(string ID)
        {
            IDnumber[] IDnumbers = new IDnumber[3];
            foreach (IDnumber IDCandidateMatch in IDnumbers)  

            { 

                if (IDCandidateMatch.ID == ID)
                {
                 StringBuilder myData = new StringBuilder();
                 myData.AppendLine(IDCandidateMatch.Name);   
                 myData.AppendLine(": ");
                 myData.AppendLine(IDCandidateMatch.ID);
                 myData.AppendLine(IDCandidateMatch.year);
                 myData.AppendLine(IDCandidateMatch.class1);
                 myData.AppendLine(IDCandidateMatch.class2);
                 myData.AppendLine(IDCandidateMatch.class3);
                 myData.AppendLine(IDCandidateMatch.class4);  
                 //return myData;
                 return myData.ToString();
    }
}
return "";

}
}

}

}

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T15:24:48+00:00Added an answer on May 14, 2026 at 3:24 pm

    Your GetDataFromNumber method is a non-static method inside the IDnumber inner class itself, hence it can only be accessed by an IDnumber object e.g IDnumbers[0].GetDataFromNumber(text);

    You could move the GetDataFromNumber method out of the IDnumber class and into the GetSchedule class instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 392k
  • Answers 392k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If you look at the metadata for SvnLogEventArgs (which is… May 15, 2026 at 1:39 am
  • Editorial Team
    Editorial Team added an answer You can't do this with jQuery...or with JavaScript at all… May 15, 2026 at 1:39 am
  • Editorial Team
    Editorial Team added an answer Actually base 64 should work. But you might want to… May 15, 2026 at 1:39 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.