class Program
{
static int localVariable = 0;
static int PropertyOne
{
get { return localVariable; }
}
static void set_PropertyOne(int newValue)
{
localVariable = newValue;
}
static void Main(string[] args)
{
}
}
**Error: already defines a member called 'set_PropertyOne' with the same parameter type**
please give me reason why is this happening. i dont need solution i need a reason for this error
regards
gemini
gemini88
0
Newbie Poster
Recommended Answers
Jump to PostWell, I am not really sure about the reason, but I see it this way:
I suspect that the declaration of a dynamic property defines a set method that has the name set_propertyName. And as you are trying to create a method that has the exaclty same name it gives …
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.