[dba-VB] C#: Did you know - private fields ...

Salakhetdinov Shamil mcp2004 at mail.ru
Sun Jun 24 10:49:18 CDT 2012


Hi Gustav --

Yes, it's interesting code reading/reviewing, and even more interesting/useful  isto debug/trace it using many provided samples/testing methods, although its latest version is converted to VS2012 and it does use MS testing framework.
So I have had to downgrade it to VS2010 (removing some C# 5.0 async features) and to edit to make it using NUnit Framework. 
I have also got selected only the sources related to the MS Access backend.
And it can be now unit-tested/debugged/traced under VS2010 + NUnit Framework 2.5.10.
I can send the result "derivative" work off-line to the interested Access-D/dba-VB devs - and we may try to "code review" it here from time to time, and to exchange opinions... 
I suppose such a "derivative work" lays within MS-PL?

http://www.opensource.org/licenses/MS-PL

Thank you.

-- Shamil


Sun, 24 Jun 2012 14:45:23 +0200 от "Gustav Brock" <gustav at cactus.dk>:
 
  
  
Hi Shamil

Thanks for this pointer. I noticed the blog which explains and documents it in full:

LINQ: Building an IQueryable provider series
http://blogs.msdn.com/mattwar/pages/linq-links.aspx

Will have to study this a quiet(!?) day.

/gustav


>>> Salakhetdinov Shamil <mcp2004 at mail.ru> 24-06-12 13:35 >>>
Hi Gustav --

I have also never attempted to do so (refer private fields/properties of another instance of the same class) - the subject coding technique is coming from here:

http://iqtoolkit.codeplex.com/SourceControl/changeset/view/89802#2219382

It's in CompundKey.cs - CompoundKey class.

It's also interesting to note that this class has one public constructor with param array 

public CompoundKey(params object[] values)

and this constructor is also called when CompoundKey class is instantiated this way:

CompoundKey key = new CompoundKey()*

with paramarray object array initialized to an empty but not null array.*

Thank you.

-- Shamil


Sun, 24 Jun 2012 11:09:02 +0200 от "Gustav Brock" <gustav at cactus.dk>:
 
  
  
Hi Shamil

No I didn't. On the other hand, I've never attempted to do so. As you and most others, I use naming conventions to separate local variables and fields from public.

/gustav

_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com

    


More information about the dba-VB mailing list