ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bob Hanson" <mnbo...@gmail.com>
Subject Re: Field names conflict with Property names when automapping
Date Thu, 13 Jul 2006 13:39:11 GMT
Actually there is one small comment in the last bullet at

"Do not apply a prefix to field names or static field names. Specifically,
do not apply a prefix to a field name to distinguish between static and
nonstatic fields. For example, applying a g_ or s_ prefix is incorrect."

That results in the vb.net problem. I'm not sure if that comment should be
read as a whole meaning that is is only referring to g_ and s_ or if the
first setence is meant to stand by itself.

On 7/13/06, Bob Hanson <mnbob70@gmail.com> wrote:
> Actually there is no specific naming guideline for .NET fields:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconNamingGuidelines.asp
> I read mutiple places that MS teams are free to use their own convention
> which apparently results in "_", "m_" or no prefix.
> I had been using "_" but switched to using nothing and instead I started
> putting "this." in front of all fields. I figured why add a convention when
> the class has a built in mechanism for this. The only plus was saving 4
> characters of typing.
> However, I then had to do some VB.NET development and the language isn't
> case sensitive. I've seen some examples that add a "Field" suffix in
> VB.NET . I think that is worse than a leading "_". So I came full circle
> and started using "_" again. :)
> On 7/13/06, Gilles Bayon < ibatis.net@gmail.com> wrote:
> >
> >
> >
> > The MS .NET guidelance is to prefix private field with an underscore,
> > this will resolve the conflict name for now.
> >

View raw message