Dong Lam Trien

Dong Lam Trien

  • 833
  • 986
  • 145.7k

Convert code have got Control to code .Net 2.0

Apr 20 2016 11:15 PM
I have the following code C# 2008 want to switch to the C#2005 Net2.0 after his move has been an error, thanks to the help available tracks.
[CODE] 
//C# 2008
namespace Vidu1
{
public partial class Form1 : Form
{
Control draggingControl = new Control{ BackColor = Color.Green, Visible = false }; // warning error here
public Form1()
{
InitializeComponent();
// ...
}
// ...
}
}
 
[/CODE] 
 
 
 
[CODE]
//C# 2005
//...
Control draggingControl = new Control();
draggingControl.BackColor = Color.Green; // warning error here
draggingControl.Visible = false; // warning error here
//...
 
[/CODE]