J
Javier Venero
I would like to know from the experienced C# programmers witch is the best
approach to solve name conflicts between function parameters & fields.
Option A (using this):
class Foo
{
string name;
public Foo(string name)
{
this.name = name;
}
}
Option B: (using m_ prefix):
class Foo
{
string m_name;
public Foo(string name)
{
m_name = name;
}
}
Option C: (no using parameters with the same name that class fields)
approach to solve name conflicts between function parameters & fields.
Option A (using this):
class Foo
{
string name;
public Foo(string name)
{
this.name = name;
}
}
Option B: (using m_ prefix):
class Foo
{
string m_name;
public Foo(string name)
{
m_name = name;
}
}
Option C: (no using parameters with the same name that class fields)