Hi - i just recently started reading up on some C# guides and tutorials. After finally deciding on one, I started doing what it said, and more.
Now at the end of one of the steps, I get an error. 4 errors, actually. And while I can doubleclick on them and see what is causing it, I don't know what to do about it. And I don't see what I've done wrong.
Link to current step: InformIT: Sams Teach Yourself C# in 24 Hours > Coding an Interface
Code:
Code:using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace WindowsFormsApplication1 { public partial class fclsViewer : Form { public fclsViewer() { InitializeComponent(); } private void btnQuit_Click(object sender, EventArgs e) { this.Close(); } } static void Main() { Application.Run(new fclsViewer()); } private void btnSelectPicture_Click(object sender, System.EventArgs e) { // Show the open file dialog box. if (ofdSelectPicture.ShowDialog() == DialogResult.OK) { // Load the picture into the picture box. picShowPicture.Image = Image.FromFile(ofdSelectPicture.FileName); // Show the name of the file in the form's caption. this.Text = String.Concat("Picture Viewer (" + ofdSelectPicture.FileName + ")"); } }
---------- Post added at 10:44 PM ---------- Previous post was at 10:13 PM ----------
Updated the code, fixed one of the errors - removed image as well