"Jon Skeet [C# MVP]" <sk***@pobox.comwrote in message
news:MP************************@msnews.microsoft.c om...
Shak <me@privacy.netwrote:
>My code looks like the follwing:
namespace A.B.C
{
...
private void foo()
{
A.B.C.Properties.Settings.Default.Save();
Properties.Settings.Default.Save() //error
}
}
The error I'm getting is "Cannot access internal property "Properties"
here". Why not though? I thought I was in the correct namespace?
Could you post a short but complete program which demonstrates the
problem?
Jon,
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace proptest
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
proptest.Properties.Settings.Default.Save();
Properties.Settings.Default.Save(); //red wavy line
}
}
}
This is a windows project that has been created from scratch from VS2005,
with a single setting added to the Settings.settings file, and the above
added to the formload event.
However, it now seems that this is only an "Intellisense" error, and the
file compiles fine and functions normally. It's still annoying though, so if
anyone knows why this is happening I'd appreciate it...
Shak