Advertisement

05.20.2008 at 02:06PM PDT, ID: 23418867
[x]
Attachment Details

c# compilation error on line 31, why?

Asked by yaronusa in Microsoft Visual C#.Net, C# Programming Language, .Net Editors & IDEs

Tags: ,

Newbie to C# 2005,

I have an error on code from a book and it won't compile. Line 31 gives the error, and it is the line that says:

"protected override void Dispose(bool disposing)"

Specifically, the word 'void' has red underlining.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
 
 
namespace DoubleBuffer
{
    public partial class Form1 : Form
    {
        private System.Windows.Forms.Timer timer1;
        private System.ComponentModel.IContainer components;
        private System.Windows.Forms.CheckBox checkbox1;
 
        float _angle;
        bool _doBuffer;
 
        public Form1()
        {
            InitializeComponent();
            this.SetStyle(ControlStyles.AllPaintingInWmPaint |
                         ControlStyles.UserPaint |
                         ControlStyles.OptimizedDoubleBuffer, true);
        }
    }
 
    protected override void Dispose(bool disposing)
    {
        if (disposing)
        {
            if (components != null)
            {
                components.Dispose();
            }
        }
        base.Dispose(disposing);
    }
 
}
 
Loading Advertisement...
 
[+][-]05.20.2008 at 02:22PM PDT, ID: 21610488

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual C#.Net, C# Programming Language, .Net Editors & IDEs
Tags: c# c sharp, Expected class, delegate, enum, interface, or struct
Sign Up Now!
Solution Provided By: gregoryyoung
Participating Experts: 3
Solution Grade: A
 
 
[+][-]05.20.2008 at 02:22PM PDT, ID: 21610490

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.20.2008 at 02:24PM PDT, ID: 21610501

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.20.2008 at 02:26PM PDT, ID: 21610519

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628