.NET Base Class Library 포럼Discuss the Base Class Library, design, and best practice issues of managed code: Collections, Diagnostics, I/O, Registry, Globalization, Reflection, and Text.© 2009 Microsoft Corporation. All rights reserved.Sat, 28 Nov 2009 22:01:17 Z7ea22a5b-087d-4187-b5fc-182712ac450fhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/f7bff27f-8719-42e1-9026-8a7d37cc99c1http://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/f7bff27f-8719-42e1-9026-8a7d37cc99c1psychogeekhttp://social.msdn.microsoft.com/Profile/ko-KR/?user=psychogeekDateTime ToBinary/FromBinary - is this a bug?Can someone explain why using ToBinary and FromBinary as shown below doesn't work 100% of the time?  This method throws the exception quite frequently.  When I examine the olddt and newdt values they are off by exactly 1 hour for some reason.  Of course, if I change the DateTimeKind to Utc there are no issues...but I believe it is supposed to work regardless of the DateTimeKind being used.<br/> <br/> Thanks in advance :)<br/> <br/> <pre lang="x-c#"> public void Test() { Random r = new Random(); for (int i = 0; i &lt; 1000000; i++) // do it enough times to ensure the failure happens { DateTime olddt = new DateTime( r.Next(1800, 2200), // year r.Next(1, 12), // month r.Next(1, 27), // day r.Next(0, 23), // hour r.Next(0, 59), // minute r.Next(0, 59), // second r.Next(0, 999), // millisecond DateTimeKind.Local); long oldvalue = olddt.ToBinary(); DateTime newdt = DateTime.FromBinary(oldvalue); if (olddt != newdt) { // This should never happen! throw new InvalidOperationException(&quot;Dates didn't match&quot;); } } }</pre> <br/>Sat, 28 Nov 2009 19:55:48 Z2009-11-28T22:01:16Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/98cc2f15-f3d0-4d95-806d-912f77be1d34http://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/98cc2f15-f3d0-4d95-806d-912f77be1d34John Aschenbrennerhttp://social.msdn.microsoft.com/Profile/ko-KR/?user=John%20AschenbrennerSystem.Reflection.Emit creating a type in a specific namespaceHi I am creating types using System.Reflection.Emit, great fun!  Anyone know how to creat a type using System.Reflection.Emit in a specific namespace?<br/><br/><hr class="sig">Thanks, -ja Sat, 21 Nov 2009 02:58:45 Z2009-11-28T19:35:52Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/ba3db718-d0f8-49f5-968d-d9d21335fa14http://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/ba3db718-d0f8-49f5-968d-d9d21335fa14Reza65http://social.msdn.microsoft.com/Profile/ko-KR/?user=Reza65calling InvokeI would appreciate some help with this. My apologies in advance if the subject is trivial. I have a GPS object that runs on it's own thread. When new GPS information arrives, I call Invoke to display the new information on my Form. It does not seem to work properly. It usually works but sometimes the form locks up. I looked at the manual pages and they say the delegate passed to invoke must be an instance of EventHandler in the &gt;NET compact framework, which is what I am using (I am writing a smart phone application). So my question is How would I do this exactly. The delegate I am calling is simply a Method of my Control class that updates some text . I am attaching the relevant parts of the code.<br/><br/>Thanks,<br/>Reza <pre lang="x-c#"> partial class RecorderForm : Form { private Gps gps = new Gps(); public RecorderForm() { InitializeComponent(); gps.Open(); gps.LocationChanged += ShowGPSInfo; } private void ShowGPSInfo(object sender, LocationChangedEventArgs args) { string s = ...; Invoke(new XXX(SetLabelGPSInfo), s); } private delegate void XXX(string s); private void SetLabelGPSInfo(string s) { labelGPSInfo.Text = s; } }</pre>Sat, 28 Nov 2009 17:33:23 Z2009-11-28T18:49:17Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/8b6d990e-0005-489b-99f7-693b9439175fhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/8b6d990e-0005-489b-99f7-693b9439175fEl Chapahttp://social.msdn.microsoft.com/Profile/ko-KR/?user=El%20ChapaSyntax error in FROM clauseHi people<br/> <br/> I've a problem with the sql clause in a vb2008 application. Please read my code and tell me what's wrong:<br/> <br/> Dim connectionString As String = &quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&quot; &amp; Application.StartupPath &amp; &quot;;&quot; + &quot;Extended Properties='text;HDR=Yes;FMT=Delimited'&quot;<br/>     Dim conn As OleDbConnection = New OleDbConnection(connectionString)<br/>     Dim da As OleDbDataAdapter<br/> Dim dt As DataTable = New DataTable(&quot;myTable&quot;)<br/>         Dim fi As New FileInfo((Application.StartupPath &amp; &quot;\generos.txt&quot;))<br/>         If Not (fi.Exists) Then<br/>             Dim archivo As New StreamWriter((Application.StartupPath &amp; &quot;\generos.txt&quot;))<br/>             archivo.WriteLine(pEncabezado)<br/>             archivo.Close()<br/>         End If<br/>         da = New OleDbDataAdapter(&quot;Select * from generos.txt orderby ID asc&quot;, conn)<br/>         da.Fill(dt)<br/>         Return dt<br/> <br/> <br/> I add the schema.ini content which I am not sure if it is correct<br/> <br/> [peliculas.txt]<br/> Format=Delimited(|)<br/> ColNameHeader=True<br/> <br/> Col1=ID           Long<br/> Col2=Titulo            Text<br/> Col3=Duracion           DateTime<br/> Col4=Descripcion         Text<br/> Col5=Alta          Text<br/> Col6=IDGenero          Long<br/> <br/> [salas.txt]<br/> Format=Delimited(|)<br/> ColNameHeader=True<br/> <br/> Col1=ID           Long<br/> Col2=Nombre            Text<br/> Col3=Detalle           Text<br/> Col4=Capacidad         Short<br/> Col5=Alta          Text<br/> <br/> [generos.txt]<br/> Format=Delimited(|)<br/> ColNameHeader=True<br/> <br/> Col1=ID           Long<br/> Col2=Nombre            Text<br/> Col3=Descripcion           Text<br/> Col4=Alta          Text<br/> <br/> [presentaciones.txt]<br/> Format=Delimited(|)<br/> ColNameHeader=True<br/> <br/> Col1=ID           Long<br/> Col2=Fecha            DateTime<br/> Col3=HoraInicio         DateTime<br/> Col4=Asistencia         Short<br/> Col5=Costo         Double<br/> Col6=Alta         Text<br/> Col7=IDSala         Long<br/> Col8=IDPelicula         Long<br/> <br/> <br/> <br/> i'm waiting for your help<br/> <br/> ChapaSat, 28 Nov 2009 00:50:26 Z2009-11-28T15:13:36Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/42090f97-0807-4af6-a64f-9dd8deaa27c7http://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/42090f97-0807-4af6-a64f-9dd8deaa27c7MinguiSunhttp://social.msdn.microsoft.com/Profile/ko-KR/?user=MinguiSunI have 2 IList<double> how to i copy ?<span style="color:#2b91af;font-size:x-small"><span style="color:#2b91af;font-size:x-small"><font size=2 color="#2b91af"><font size=2 color="#2b91af"> <p>I have 2 IList</p> </font></font></span><font size=2 color="#2b91af"> <p> </p> </font></span> <p><span style="font-size:x-small">&lt;</span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">double</span></span><span style="font-size:x-small">&gt; how to i copy content from one to another? Do you have something like one.asign(two)? I pass reference to function so i cannot do one = two.</span></p>Fri, 27 Nov 2009 19:31:43 Z2009-11-28T14:52:44Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/79acb027-bcc4-4541-b312-b379d3abe338http://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/79acb027-bcc4-4541-b312-b379d3abe338snorlakshttp://social.msdn.microsoft.com/Profile/ko-KR/?user=snorlaksIntegration between threadsHello,<br/> <br/> Im interested is it possible to make a connection between two threads in two different projects. <br/> <br/> I have one project called Core and one called Client.<br/> <br/> From the Client project I use classes from Core project just to perform logic.<br/> <br/> In my Client Winforms project I call thread which is invoking method from Core project class. And I would like to inform every loop iteration or every n iterations that they are done just to update progress bar.<br/> <br/> function in core class is sth like<br/> <br/> for (int i = 0; i &lt; 1000; i++)<br/> {<br/> do sth ...<br/> }<br/> <br/> just to make it simple.<br/> <br/> And lets Say I would like to upate prgoress bar from client every 10 iterations. Is it possible ?? How can I achieve that ?? I use in the client project reference to Core project so I cant use references to the Client project from the core (circular references).<br/> <br/> Hmm thats tricky :)<br/> <br/> thanks for helpSat, 28 Nov 2009 13:58:55 Z2009-11-28T13:58:56Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/28ee5a82-4f9b-4d2d-a85b-9b74dd199a1ahttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/28ee5a82-4f9b-4d2d-a85b-9b74dd199a1asephiroth500http://social.msdn.microsoft.com/Profile/ko-KR/?user=sephiroth500Help with stringHi,<br/> <br/> First of all apologies if this seems a trivial question but i'm relatively new to C# so please bear with me.<br/> <br/> I have a string which contains the characters =&lt;, the full string is &quot;=&lt;dg&gt;&quot;, however when I use this combination the &lt;dg&gt; disappears.  If the = is taken away or the &lt; then the string displays as expected.  I have taken a look at escape sequences and there doesn't seem to be any requirement for = or &lt;, so how do I incorporate this sequence within the string?<br/> <br/>Sat, 28 Nov 2009 13:15:38 Z2009-11-28T13:47:19Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/ff66d7b2-e415-4b2f-806f-d126768ea35chttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/ff66d7b2-e415-4b2f-806f-d126768ea35csnorlakshttp://social.msdn.microsoft.com/Profile/ko-KR/?user=snorlaksMDI child in the frontHello,<br/> <br/> How can I make one of my mdi child form to be in the front of others?<br/> <br/> thanks for helpSat, 28 Nov 2009 11:29:50 Z2009-11-28T11:58:24Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/c77a8eaa-8c0e-4dd3-b963-ace4540f944chttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/c77a8eaa-8c0e-4dd3-b963-ace4540f944cMinguiSunhttp://social.msdn.microsoft.com/Profile/ko-KR/?user=MinguiSunAuto Reconnect when connection I looking for option for getting MySqlConnection object to auto connect if server bounce. Is there something like this in C#?<br/><br/>I am using  Assembly MySql.Data.dll v2.0.50727<br/><br/><br/>Fri, 27 Nov 2009 14:50:08 Z2009-11-28T01:25:40Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/1fdb2c11-dd1e-4c9b-bfdd-e7ba68fca918http://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/1fdb2c11-dd1e-4c9b-bfdd-e7ba68fca918John Aschenbrennerhttp://social.msdn.microsoft.com/Profile/ko-KR/?user=John%20AschenbrennerError while compiling a CodeDOM compile unit - cannot find referenced assyHi all I have a CodeDOM compile unit that has a problem finding a given referenced library.<br/><br/>The below snippet does not compile because as the error says, it cannot find the referenced dll.  Here is the error - <br/>Metadata file 'System.Xml.Linq.dll' could not be found.<br/><br/>If I provide the entire path to the either place where this file is located it compiles fine.  (I have a 64-bit Vista Ultimate OS)<br/><br/> <pre lang="x-c#"> CSharpCodeProvider codeProvider = new CSharpCodeProvider(); CompilerParameters compileOptions = new CompilerParameters(); // add the referenced assy's compileOptions.ReferencedAssemblies.Add(&quot;TestFactory.dll&quot;); compileOptions.ReferencedAssemblies.Add(&quot;System.Xml.dll&quot;); compileOptions.ReferencedAssemblies.Add(&quot;System.Xml.Linq.dll&quot;); //compileOptions.ReferencedAssemblies.Add(@&quot;C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll&quot;); //compileOptions.ReferencedAssemblies.Add(@&quot;c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll&quot;); compileOptions.ReferencedAssemblies.Add(&quot;System.dll&quot;); compileOptions.GenerateInMemory = false; </pre> <br/>Why is the CompileAssembly method failing to find 'System.Xml.Linq.dll' ?<br/><br/><span style="color:#008000;font-size:x-small"><span style="color:#008000;font-size:x-small"> <p> </p> </span></span><hr class="sig">Thanks, -ja Fri, 27 Nov 2009 20:42:39 Z2009-11-28T01:21:30Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/c8ad0326-0f69-48da-bc18-886a8e8d4e09http://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/c8ad0326-0f69-48da-bc18-886a8e8d4e09Michał Januszczykhttp://social.msdn.microsoft.com/Profile/ko-KR/?user=Micha%u0142%20Januszczyk"Open with" file context menuIn my application I am trying to implement &quot;open with&quot; context menu. <br/>How can I read (probably from registry) registered applications paths that are registered to open <strong>specified extension</strong> ? (the list of applications that are displayed on the context menu (under &quot;Open with&quot; submenu) when user right clicks a file in windows explorer)<br/><br/>Thanks for help, <br/>MichalTue, 24 Nov 2009 15:43:26 Z2009-11-28T00:09:53Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/a716c51e-2ef3-489f-9235-e44b61e2275ehttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/a716c51e-2ef3-489f-9235-e44b61e2275eSomescreennamehttp://social.msdn.microsoft.com/Profile/ko-KR/?user=SomescreennameGetting a listing of files on a digital camera.I'm trying to write a program in C# to access a digital camera's storage. I'm getting the path to it via the setupapi.dll calls. It's after connecting via &quot;CreateFile&quot; that I'm lost. Of course it's all with p/invokes.  (The C# is just a preference. I will not hesitate to write a C/C++ dll if I have to.)<br/> <br/> From what I understand, the only file apis I can use are: CreateFile, Read, Write (won't need that), close and deviceIOControl - this is on XP with the hope of also using it on  Vista and 7. Speaking of Vista, I see that it can open up the camera as a camera or in Explorer.  All the examples on the web regarding USB are for HIDs which for other than getting the path to the device, hasn't been much help in regards to what I want to do. I've also looked at the WinUSB white paper and it doesn't seem to be what I need either. <br/> <br/> I've been also poking around the WDK docs to see if there's some that can help me and so far nothing - at least from my understanding.<br/> <br/> I would greatly appreciate any direction anyone can give me.<br/> <br/> Thank you.<br/> <br/>Fri, 27 Nov 2009 21:32:34 Z2009-11-27T23:57:18Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/46a594f2-bc4d-427b-8e2a-89c249294d8ahttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/46a594f2-bc4d-427b-8e2a-89c249294d8asnorlakshttp://social.msdn.microsoft.com/Profile/ko-KR/?user=snorlaksLinq retrieve one objectHi In LINQ I can get objects from database like that :<br/> <br/> DataContext dataContext = new DataContext();<br/> var element = from p in dataContext.DataParameters where p.Id == id select p;<br/> <br/> But it gives me a list or sth not one object even though I know there is only one object<br/> <br/> So is there an option to Get one object from dataContext ?<br/> <br/> Or I have to do it like above and then do Take(1) ??<br/> <br/> thanks for help<br/>            Fri, 27 Nov 2009 22:32:10 Z2009-11-28T10:13:34Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/32116144-8f6a-4d85-90cc-949191a4e386http://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/32116144-8f6a-4d85-90cc-949191a4e386kramer937http://social.msdn.microsoft.com/Profile/ko-KR/?user=kramer937Split audio file depending on pause in soundI have been looking on MSDN for an API that is able to monitor when there is no sound being produced from an audio file.. All that I have found is an API that checks/sets the volume on the client.<br/> <br/> Can anyone point me in the correct direction?Fri, 27 Nov 2009 20:07:55 Z2009-11-27T20:07:56Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/2ba97b3e-eac5-40a4-9ef2-6591ac9171bchttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/2ba97b3e-eac5-40a4-9ef2-6591ac9171bcsnorlakshttp://social.msdn.microsoft.com/Profile/ko-KR/?user=snorlaksBest practice for MDIHello,<br/> <br/> How can I make functionality to have only one MDI child of specific type opened ?<br/> <br/> On the toolstrip I have button which makes new MDI child And I want it to be available only when MDI child of this type isnt already running.<br/> <br/> Thanks for helpFri, 27 Nov 2009 19:35:35 Z2009-11-27T19:46:43Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/bccaa347-4493-4584-a06b-c984f1007310http://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/bccaa347-4493-4584-a06b-c984f1007310Godeffroyhttp://social.msdn.microsoft.com/Profile/ko-KR/?user=GodeffroyHow can I run multiple processes one by one in a loop ? Hi all,<br/> <br/> I want to execute a list of processes with diagnostics. <br/> The processes refer to an executable. I want to execute it multiple times.<br/> The result is the creation of a file.<br/> <br/> Unfortunately the code below does not produces 2 result files when we have more than 2 arguments.<br/> For example if have 5 arguments i expect to get 5 results files but it only produces 2 !<br/> What is wrong in this code ?<br/> <br/> <pre lang="x-c#">public void Launch(string[] arguments) { listProcesses = new List&lt;System.Diagnostics.Process&gt;(); foreach (string argument in arguments) { System.Diagnostics.Process process = new System.Diagnostics.Process(); launchApplication(argument, process); } } private void launchApplication(string argument, System.Diagnostics.Process process) { process = new System.Diagnostics.Process(); process.StartInfo.Arguments = arguments; process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; process.StartInfo.FileName = Constants.method; process.Start(); process.WaitForExit(); }</pre> <br/> <br/> <br/> Thanks,Fri, 27 Nov 2009 17:14:39 Z2009-11-27T17:37:34Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/6991e792-e52c-4f88-b0c3-868c4883d400http://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/6991e792-e52c-4f88-b0c3-868c4883d400john selvarajhttp://social.msdn.microsoft.com/Profile/ko-KR/?user=john%20selvarajproblem with down loading a word document using C#<p>hi</p> <p>i have grid view with the &quot;view file&quot; column. when the user click the view file link button in the gird, that shold open the corresponding document file which is already stord.</p> <p>The problem is when i click view  i ask me &quot; you are choosen to open &quot;sample.txt&quot; which is a flock document&quot;. And when i click ok it open in flock browse which is not in human readable.</p> <p>But unfortunatlly, when i have the same option outside the grid as a link button, it defaultly open in the microsoft word..</p> <p>I need the same feature for the link button which is inside the grid too.</p> <p>It is urgent . help in this....</p> <p>Thanks in advance.</p> <p>The code i use</p> <pre class=c-sharp>string filename = ds.Tables[0].Rows[0][&quot;ConsentFormName&quot;].ToString(); string filepath = Server.MapPath(&quot;../Admin/ConsentForm/&quot; + filename); if (System.IO.File.Exists(filepath)) { Response.ClearHeaders(); Response.ClearContent(); Response.Clear(); Response.AddHeader(&quot;Content-Disposition&quot;, &quot;attachment;filename=&quot; + filename); Response.WriteFile(filepath); Response.End(); } else { Page.RegisterStartupScript(&quot;GetType&quot;, &quot;&lt;script language='javascript'&gt;alert('The File is not available');&lt;/script&gt;&quot;); }</pre> <p><br/> </p>Thu, 26 Nov 2009 11:17:24 Z2009-11-27T16:28:51Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/24aedffd-f589-4eb7-b736-2a43431fd356http://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/24aedffd-f589-4eb7-b736-2a43431fd356Ravikumar Vemanahttp://social.msdn.microsoft.com/Profile/ko-KR/?user=Ravikumar%20VemanaConverting or Upgrading form vb6 code to vb.net using vs 2005Hi ALL,<br/><br/>Converting or Upgrading form vb6 code to vb.net using vs 2005 is better or i need to create freshly the project and write the code in vb.net. Which is better and faster.<br/><br/>Kindly help me in this.<br/><br/>thanks<br/>Ravikumar VemanaFri, 27 Nov 2009 13:25:31 Z2009-11-27T16:08:58Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/c276ce3c-9abc-4b10-8354-77d7f55ed56fhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/c276ce3c-9abc-4b10-8354-77d7f55ed56fGodeffroyhttp://social.msdn.microsoft.com/Profile/ko-KR/?user=GodeffroyHow to add a sign plus (+) to a node in the treeview without adding any nodes elements into it ?Hi all,<br/> <br/> Basically i would like to display a (+) close to a Node for a particular condition.<br/> When the user click on sign plus(+) the node will be populated with children.<br/> The reason why I am doing this is because of performance issue only. <br/> It takes time to get all children of the nodes. Therefore i will populate the children only if the user is doing the request.<br/> How can I do that ?<br/> <br/> Thanks,Fri, 27 Nov 2009 14:05:36 Z2009-11-27T16:53:04Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/0227467c-4a7a-4c43-8fa9-95ba5257b0b1http://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/0227467c-4a7a-4c43-8fa9-95ba5257b0b1XRayYankeehttp://social.msdn.microsoft.com/Profile/ko-KR/?user=XRayYankeeDataBinding problem: DataSource not updatingI use data binding with two custom objects: Contract and Customer. Each Contract has a unique ContractID and always belongs to only one Customer. Each Customer may have one or more Contracts. (The Customer object is also used on other forms as an independent object.)<br/><br/>Contract is a custom class with a number of scalar members (such as ContractID, start date and so on) and an object member of Customer type. <br/><br/>For my form I set up a Contract object as DataSource for a BindingSource (called ContractBindingSource) to which i bind all the controls on the form. On the form I have one group of controls that display Customer data, and the rest of the controls display Contract data.<br/><br/>My Contract and Customer objects both implement the  IEditableObject and INotifyPrpertyCnanged and raise PropertyChanged events.<br/><br/>When I want to save changed data, I issue a ContractBindingSource.EndEdit to flush all the changes made in the controls on the form to the underlying Customer object which has a Save method that calls a helper class that knows how to save a changed Contract object to the database.<br/>  <br/>The whole thing works, but only partially. That is, all controls bound to simple (scalar) members of Contract transfer their content as axpected and the database is normally updated.<br/><br/>But, all controls bound to the dependent Customer object refuse to do the same and changes made on them are  lost.<br/><br/>Before issuing ContractBindingSource.EndEdit, I tried this, but it didn't work:<br/><br/>Dim theContract as ContractClass = CType(ContractBindingSource.Current, ContractClass)<br/>theContract.theCustomer.EndEdit()<br/><br/>It seems as if Customer being &quot;inside&quot; Contract there is no one to notice PropertyChanged events originating from Customer.<br/><br/>For the time being I solved the problem issuing commands such as <br/><br/>CustomerNameTextBox.DataBindings(0).WriteValue()<br/><br/>and it works, I get changed Customer data, but I find this rather ugly since I don't have to do the same for non-Customer bound controls. Is there a more elegant  solution?<br/><br/>Can anyone shed more light please? Thank you in advance.Fri, 27 Nov 2009 15:57:16 Z2009-11-27T15:57:19Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/33cc0e27-dbbf-499a-b507-761eafad1552http://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/33cc0e27-dbbf-499a-b507-761eafad1552sush_raihttp://social.msdn.microsoft.com/Profile/ko-KR/?user=sush_raiMarshal.PtrToStructure throws System.Execution ExceptionI have a function that Converts Byte Array to Structure, where I am using Marshal.PtrToStructure.<br/> Marshal.PtrToStructure throws System.Execution Exception some time, I dont get this Exception all the time.<br/>When I perform Continous operation on a function which calls Marshal.PtrToStructure, during that time this Exception is thrown.<br/>Please let me know, how to resolve this.<br/>Wed, 25 Nov 2009 08:23:58 Z2009-11-27T15:00:40Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/42c3ca52-e7b0-4476-ab67-0bbdb073bafahttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/42c3ca52-e7b0-4476-ab67-0bbdb073bafaApekshithttp://social.msdn.microsoft.com/Profile/ko-KR/?user=ApekshitC to C# ConversionHi all,<br/> I have a program in C language i want to convert it into C#, is any tool to convert it into C# language ??<br/> <br/> Thanks in advance.<hr class="sig">Apekshit | <a href="http://ignou-student.blogspot.com/">http://ignou-student.blogspot.com/</a>Fri, 27 Nov 2009 13:04:27 Z2009-11-27T14:47:05Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/5117ac96-9102-424c-8d99-385028d8ec95http://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/5117ac96-9102-424c-8d99-385028d8ec95sn75http://social.msdn.microsoft.com/Profile/ko-KR/?user=sn75Error with LINQI have a datatable (from SQL Express) and I can not run any LINQ code on it. The datatable code is auto-generated. <div><br/></div> <div>System.Core is referenced</div> <div>System.LINQ in used</div> <div><br/></div> <div>But when I try any LINQ command it tells me </div> <div> ... does not contain a definition for 'SingleOrDefault' and no extension method 'SingleOrDefault' accepting a first argument of type '...DataTable' could be found (are you missing a using directive or an assembly reference?)</div> <div><br/></div> <div>I gave up</div> <div> <div><br/></div> </div> <div><br/></div>Fri, 27 Nov 2009 13:47:28 Z2009-11-27T14:41:08Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/656e92d5-c3fe-4c55-bb99-8de165f87b7fhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/656e92d5-c3fe-4c55-bb99-8de165f87b7fJohnAbrahamhttp://social.msdn.microsoft.com/Profile/ko-KR/?user=JohnAbrahamUse DataSet In ASP.NET MVC<p>Hi,</p> <p>I want to use dataset in asp.net mvc 1.0 rather than Linq to Sql.<br/><br/>anyone can help me out. i want to show list of Customer using Asp.Net MVC 1.0<br/><br/>i am new in ASP.NET MVC 1.0 can you give me an example of dataset.<br/><br/>Thanks<br/>John</p>Fri, 27 Nov 2009 13:34:05 Z2009-11-27T13:49:15Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/1d9ea92a-212a-4cfb-9211-faea9c61e188http://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/1d9ea92a-212a-4cfb-9211-faea9c61e188Mukesh Girihttp://social.msdn.microsoft.com/Profile/ko-KR/?user=Mukesh%20GiriSystem.Diagnostics for logging to a text file..Hi:<br/>I am using system.diagnostics to log to a text.log file.When i am using my function in my windows application on development machine i am able to generate the desired logs.<br/><br/>But when i try to run my .exe to other machine i am not getting any logs.<br/><br/>Does .net framework should be there on that particular machine as i see it's not installed on that server?<br/><br/>Thanks,<hr class="sig">Best Regards, Mukesh Giri System EngineerFri, 27 Nov 2009 09:18:20 Z2009-11-27T12:06:55Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/838c4bd7-3add-4f2a-846f-fbcf2c370a52http://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/838c4bd7-3add-4f2a-846f-fbcf2c370a52Maheshwaran Mahendranhttp://social.msdn.microsoft.com/Profile/ko-KR/?user=Maheshwaran%20MahendranParent Form Click EventHi,<br/> <br/> I got a situation where in my C# winform Application there is Parent window called Form1 and during runtime I am instantiating another winform called Form2 within Form1 code and i am launching it. In that Form2, I am popping up a modal message box. In this situation if I do a mouse click on top of Form2, I can't do anything and same thing applicable for Form1 as well.<br/> <br/> The question is How can I trap a event when I clicked on top of Form1 area, when a modal message box launched from Form2 environment. <br/> I subscribed Form1's click event, but control never comes there. I have even tried setting Form1's Key-preview as True. But no response for the Form1's Click event.<br/> <br/> Could anyone help me solving this ?<br/> <br/> Thanks in Advance,<br/> M MaheshwaranFri, 27 Nov 2009 11:05:37 Z2009-11-27T11:55:46Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/1b3e51a1-de35-4b0d-979e-e890b7c14fd7http://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/1b3e51a1-de35-4b0d-979e-e890b7c14fd7Keereweerhttp://social.msdn.microsoft.com/Profile/ko-KR/?user=KeereweerPopulating dataset while using a class with methods and tasks<p>I have just started with a MCPD course. I have a project in Vs 2008 where I want to display two datagridviews. In the first you can see production orders and in the second i want to show where an employee is working on and when.<br/>In the dataset designer create an dataset. Create a second dataset and fill through a tableadapter.<br/>Now i want to fill the first dataset with using OOP (learn OOP). So use the created class en organize it with methods and tasks to eventually fill the dataset with columns so its going to look like an excel planning with colours and date columns.<br/><br/>How do I handle this.</p>Fri, 27 Nov 2009 11:38:11 Z2009-11-27T11:38:12Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/12a3558d-fe48-44fd-840e-03facfd9c944http://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/12a3558d-fe48-44fd-840e-03facfd9c944Atul Barihttp://social.msdn.microsoft.com/Profile/ko-KR/?user=Atul%20BariUnicode to Hindi (Devnagari) conversion using vb.netHello Friends,<br /> i had a text file which contains the unicode data i want to convert that data to Hindi (Devanagari).<br /> Here is the example for the same<br /> <!-- [if gte mso 10]> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} <![endif]--><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;;">Input Unicode</span> <span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;;"> data is :0928;0940;0932;092E<br /> <!-- [if !supportLineBreakNewLine]--></span> and&nbsp; o<span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;;">utput Required is (Hindi) :</span> <span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;;"> </span> <span style="font-size: 12pt; font-family: Mangal;" lang="AR-SA">निलम</span> ..<br /> Please tell me how can i convert the above using vb.net<br /> <br /> <br /> <br /> Thanks in advanced,<br /> Atul Bari<br />Thu, 08 Oct 2009 10:54:08 Z2009-11-27T11:12:11Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/737135ae-1f7c-49e4-b30c-8206eefb7621http://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/737135ae-1f7c-49e4-b30c-8206eefb7621SIVAIShttp://social.msdn.microsoft.com/Profile/ko-KR/?user=SIVAISversion 2.2.0.0, stamp 4a892abf, faulting module ntdll.dll, version 5.1.2600.3520, stamp 49900370, debug? 0, fault address 0x00036a12. Hi All, <div><br/></div> <div>Can any one help me finding out what could be the cause of this error.</div> <div><br/></div> <div> <div>Faulting application MyApplicationl.exe, version 2.2.0.0, stamp 4a892abf, faulting module ntdll.dll, version 5.1.2600.3520, stamp 49900370, debug? 0, fault address 0x00036a12.</div> <div><br/></div> <div>When I run my application it suddenly crashed and the log file has no clue. </div> <div>When i searched the system event log I found this exactly at the time of application crash.</div> <div><br/></div> <div>Please help it's very urgent.</div> <div><br/></div> <div>thanks in advance..</div> <div><br/></div> </div>Tue, 18 Aug 2009 05:44:08 Z2009-11-27T10:48:22Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/cd88e18b-9406-4369-8bbc-e9ed49472483http://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/cd88e18b-9406-4369-8bbc-e9ed49472483Apekshithttp://social.msdn.microsoft.com/Profile/ko-KR/?user=ApekshitDeveloping FTP client application ?Hi all,<br/> I am developing a FTP Client application in which I am developing code for filling treeview of client side directory structure, now i want to fill another treeview with FTP side directory structure. <br/> <br/> My question is that how to fill FTP site directory stucture for filling the tree view my code for filling client site treeview is following:-<br/> <br/> <pre lang="x-c#"> private void PopulateTreeView(string directoryValue, TreeNode parentNode) { string[] directoryArray = Directory.GetDirectories(directoryValue); string[] fileArray = Directory.GetFiles(directoryValue); if (directoryArray.Length != 0) { foreach (string currentDirectory in directoryArray) { TreeNode myNode = new TreeNode(Path.GetFileNameWithoutExtension(currentDirectory)); if (parentNode == null) { treeView1.Nodes.Add(myNode); } else { parentNode.Nodes.Add(myNode); } PopulateTreeView(currentDirectory, myNode); } } if (fileArray.Length != 0) { foreach (string currentFile in fileArray) { TreeNode myNode = new TreeNode(Path.GetFileName(currentFile)); if (parentNode == null) { treeView1.Nodes.Add(myNode); } else { parentNode.Nodes.Add(myNode); } } } } private void button2_Click(object sender, EventArgs e) { PopulateTreeView(@&quot;D:\&quot;, null); }</pre>  <br/> <br/> Please give me suggestions as early as possible.<br/> Thanks in advance.<br/> <hr class=sig>   Apekshit | <a href="http://ignou-student.blogspot.com/">http://ignou-student.blogspot.com/</a>Fri, 27 Nov 2009 06:51:12 Z2009-11-27T10:29:25Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/79e4dec1-1119-4612-805f-c1aeee0fdc3ehttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/79e4dec1-1119-4612-805f-c1aeee0fdc3eMini2http://social.msdn.microsoft.com/Profile/ko-KR/?user=Mini2Registry and Windows 7Hello, <br/> <br/> I have an existing # (.net 2.0) applicatione which works fine on XP and Vista machines but not on all Windows 7 machines (it works on a 32bit Business version and on a 32bit Starter version (on a netbook), but it does not work on a 64bit home premium version).<br/> <br/> The code is quite easy:<br/> <pre lang="x-c#">RegistryKey regkey = Registry.LocalMachine.CreateSubKey(&quot;SOFTWARE\\MYCOMPANY&quot;); </pre> But an exception is thrown at this line.<br/> <br/> After this I check read some values (with a default value so they are created if they don't exist).<br/> The registry key is not created at installation (but this does not seem to be a problem with the other machines) and when I manually create the key the problem remains the same.<br/> Although I'm logged in as a user with administrator rights, the problem occurs when I start the executable by double clicking it, but is does not occur when I right click the exe and choose &quot;Run as administrator&quot; (the key and its values are created in the normal registry not in the Wow6432Node, see below)<br/> <br/> I'm not sure the problem is &quot;Windows 7&quot; or &quot;64bit&quot; related.<br/> I've read some things about 32bit applications accessing the 64 bit registry but I'm not sure if I fully understand it. Can anyone tell me if this is correct:<br/> - For 32 bit application there is a special key inside the 64bit registry (\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node)<br/> - this node is a kind of &quot;virtual&quot; 32 bit registry where 32bit applications can write to<br/> - My code above should automatically write to this special node when working on a 64 bit machine (and to the normal registry on 32 bit systems). <br/> <br/> If the above is correct, I think I can conclude that the problem is &quot;Windows 7&quot; related<br/> <br/> With Vista I had a similar problem in the past but this was because I used OpenSubkey(&quot;SOFTWARE&quot;). This I can understand because opening the &quot;SOFTWARE&quot; key is a bit suspicious.<br/> <br/> Anybody a suggestion (besides a return to an &quot;ini&quot; file)?Wed, 25 Nov 2009 09:39:21 Z2009-11-27T10:15:25Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/f4ac99b0-8058-4ff2-a318-932fd4baebabhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/f4ac99b0-8058-4ff2-a318-932fd4baebabApekshithttp://social.msdn.microsoft.com/Profile/ko-KR/?user=ApekshitHow to be convert pdf file to swf through .net code ?I want to know that how can i convert pdf file to swf through .net c# code ?<hr class="sig">Apekshit | <a href="http://www.ignou-student.blogspot.com/">http://www.ignou-student.blogspot.com/</a>Thu, 19 Nov 2009 06:57:25 Z2009-11-27T09:53:48Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/817a3795-67d9-4ec4-ac30-5af8c33b3b7bhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/817a3795-67d9-4ec4-ac30-5af8c33b3b7bBinod K Guptahttp://social.msdn.microsoft.com/Profile/ko-KR/?user=Binod%20K%20GuptaCOM in .NETHow can i use my COM in .NETMon, 23 Nov 2009 18:40:37 Z2009-11-27T09:22:45Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/fff9066c-217d-4f9c-ba82-2feba7d66f25http://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/fff9066c-217d-4f9c-ba82-2feba7d66f25Satish.Jhttp://social.msdn.microsoft.com/Profile/ko-KR/?user=Satish.JChange the language of the spell check dictionary supported by Microsoft.Office.Interop.WordHi,<br/><br/>    Iam using <span style="font-size:x-small">Microsoft.Office.Interop.Word for launching the spell checker. I need to change the language to french. Any thoughts on achieving this would be much appreciated. <br/><br/>Also, Iam looking at customizing the spell checker UI, such as applying a background colour for the buttons, changing the Button's text (e.g. &quot;Ingore this time&quot; instead of &quot;Ignore Once&quot; or so..).  Let me know if it is feasible to customize and if so, pls point to the sample code snippet.<br/><br/>Thanks,<br/>Satish</span><hr class="sig">Satish.JFri, 27 Nov 2009 06:49:48 Z2009-11-27T06:49:49Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/640f96a3-4089-4444-ab3c-25e6b49a74dehttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/640f96a3-4089-4444-ab3c-25e6b49a74deDie On Timehttp://social.msdn.microsoft.com/Profile/ko-KR/?user=Die%20On%20TimeEstablishing Connection to remote server.Hi,<br/><br/>           i'm facing some problem in establishing connection to remote server. i need to do some functions like checking disk space, service status etc.. using .net. But <strong>i don't need</strong> to connect to the server using <strong>Remote desktop connection</strong>.. i need to do it through .net application.<br/><br/>Can anybody please help me in this? is there any class or specific namespace by that we can do this??Mon, 23 Nov 2009 07:41:04 Z2009-11-27T06:07:10Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/a56a177e-8e9c-4509-923b-6fbb2c566ce2http://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/a56a177e-8e9c-4509-923b-6fbb2c566ce2Yoonmyhttp://social.msdn.microsoft.com/Profile/ko-KR/?user=YoonmyHow to check Password in Installer class?<p>Hi everybody, I've some problem about Setup project.<br/><br/>In User Interface of Setup project, I add Textboxes dialog for receive password. The dialog have two Textboxes, First textbox is password textbox and Second textbox is confirm password textbox.<br/><br/>How to check password from both textboxes that same or not? if same password the operation still continue. Or not the operation'll be stop and inform message to User for edit.</p>Thu, 19 Nov 2009 17:03:57 Z2009-11-27T06:02:29Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/b16902dc-cf59-42e1-8290-a125f0867630http://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/b16902dc-cf59-42e1-8290-a125f0867630igor_berhttp://social.msdn.microsoft.com/Profile/ko-KR/?user=igor_berRealTime .NET Framework for rebust development at SOFT RTHey, <div><br/></div> <div>I've heard that there is some soft RT framework on top of .NET Base Class Library that provides a good alternative for C++. </div> <div>You get an soft RT performance using GC, C# and all other cool features of developing in .NET Framework and C# enviroument.</div> <div><br/></div> <div>I live at Israel so I'd like to get a name of product and sales manager that can provide my company an offer if it's a payed resource.</div> <div><br/></div> <div>Thanks!</div>Sat, 21 Nov 2009 15:53:49 Z2009-11-27T06:01:10Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/6417a014-352c-4202-bf69-44509a48fc25http://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/6417a014-352c-4202-bf69-44509a48fc25Am Xhttp://social.msdn.microsoft.com/Profile/ko-KR/?user=Am%20XSetting Object=Null sets it's child objects?Hi <br/> I have defined a class like<br/> public class CSBusinessLogic<br/>     {<br/>         private CommonServiceDA commonServiceDA = new CommonServiceDA();<br/>        <br/>         public List&lt;string&gt; GetStates()<br/>         {<br/>             return commonServiceDA.GetStates();<br/>         }     <br/>       <br/>         public StateCollection GetStatesOnLoad()<br/>         {<br/>             return commonServiceDA.GetStatesOnLoad();<br/>             <br/>         }<br/> }<br/> <br/> Now in my different  WCF methods i am creating an object of CSBusinessLogic and using it's methods. and after that setting it to null value.<br/> CSBusinessLogic ObjBusinessLogic  = new CSBusinessLogic();<br/> .<br/> .<br/> .<br/> ObjBusinessLogic = null;<br/> <br/> i would like to know once i set the parent object to null value, does it's child object (here commonServiceDA ) also to null value. or should i set it's child value also to null value, before setting parent object. I have thousands of wcf methods. If people start using it is there anyway to avoid memory leak? whats the best practice<br/> <br/>        Fri, 27 Nov 2009 03:41:19 Z2009-11-27T05:34:50Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/7e845524-f4c4-4cc5-8fce-26d56950f7b1http://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/7e845524-f4c4-4cc5-8fce-26d56950f7b1yazeemhttp://social.msdn.microsoft.com/Profile/ko-KR/?user=yazeemupdating and deleting entries in resource (.resx) fileHi all,<br/> <br/> I am using <strong>ResXResourceWriter</strong> to generate <strong>.resx</strong> file. i can add resource entries in it but how to update and delete specific resource entry ??<br/> i don't want to delete existing .resx file and generate a new file again with updated values.Thu, 26 Nov 2009 10:29:24 Z2009-11-27T04:50:16Zhttp://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/cf5fb569-8984-4c4c-a4c6-5e4b5e2ebfe3http://social.msdn.microsoft.com/Forums/ko-KR/netfxbcl/thread/cf5fb569-8984-4c4c-a4c6-5e4b5e2ebfe3John Aschenbrennerhttp://social.msdn.microsoft.com/Profile/ko-KR/?user=John%20AschenbrennerHelp with Aggregate for Dynamic Type Object Mapper classHi all,<br/><br/>I have created a Object Mapper class using the System.Reflection.Emit namespace.  It is a necessity that I create some type of dynamic types to contain the data that is contained in the XML files that I am using.<br/><br/>I have this working in that given an XML file based on an XSD of a given type I can build a dynamic type that contains all the data as properties and an overload of the ToString method that returns the name of the test data being represented.<br/><br/>Now I have a requirement to return aggregates of the numeric data values given a collection of the above.  Perhaps some code will give you an idea of what I am trying to emit.  I did use ildasm to look at the IL and it appears to contain IL that is above my pay grade to produce.  I have thought about using the code dom or reflection to solve the same problem but am looking for a great suggestion from you folks out there.<br/><br/>At any rate here is a sample of what the aggregate class should look like that needs to be created dynamically.<br/><br/> <pre lang="x-c#"> public class _2chTests : List&lt;_2ch&gt; { public _2chTests() { } public _2chTests(IEnumerable&lt;_2ch&gt; tests) : base(tests) { } public enum Function { Mean, StandardDeviation, Sum, Max, Min, Number }; private StatisticalMath.Function functionType = StatisticalMath.Function.Mean; #region Public Properties // can be Mean, Standard Deviation, Sum, Min, Max or Count public string Function { get { return &quot;Mean&quot;; } } public string Session { get { return string.Empty; } } public string Run { get { return string.Empty; } } public string Date { get { return string.Empty; } } public string Time { get { return string.Empty; } } // functionType is an enum representing a given StatisticalMath function public double MeanRTCorr { get { return StatisticalMath.AggregateFunction(functionType, from m in this select m.MeanRTCorr); } } public double StDevRTCorr { get { return StatisticalMath.AggregateFunction(functionType, from m in this select m.StDevRTCorr); } } public double NumTrials { get { return StatisticalMath.AggregateFunction(functionType, from m in this select m.NumTrials); } } public double NumCorr { get { return StatisticalMath.AggregateFunction(functionType, from m in this select m.NumCorr); } } public double NumInc { get { return StatisticalMath.AggregateFunction(functionType, from m in this select m.NumInc); } } public double NumLapse { get { return StatisticalMath.AggregateFunction(functionType, from m in this select m.NumLapse); } } public double PercCorr { get { return StatisticalMath.AggregateFunction(functionType, from m in this select m.PercCorr); } } public double PercLapse { get { return StatisticalMath.AggregateFunction(functionType, from m in this select m.PercLapse); } } public double Speed { get { return StatisticalMath.AggregateFunction(functionType, from m in this select m.Speed); } } public double Throughput { get { return StatisticalMath.AggregateFunction(functionType, from m in this select m.Throughput); } } public double LegacyThru { get { return StatisticalMath.AggregateFunction(functionType, from m in this select m.LegacyThru); } } public double MinRTCorr { get { return StatisticalMath.AggregateFunction(functionType, from m in this select m.MinRTCorr); } } public double MaxRTCorr { get { return StatisticalMath.AggregateFunction(functionType, from m in this select m.MaxRTCorr); } } public double MinRT { get { return StatisticalMath.AggregateFunction(functionType, from m in this select m.MinRT); } } public double MaxRT { get { return StatisticalMath.AggregateFunction(functionType, from m in this select m.MaxRT); } } public double NumBad { get { return StatisticalMath.AggregateFunction(functionType, from m in this select m.NumBad); } } public double MedRTCorr { get { return StatisticalMath.AggregateFunction(functionType, from m in this select m.MedRTCorr); } } public double MedRT { get { return StatisticalMath.AggregateFunction(functionType, from m in this select m.MedRT); } } public double MeanRT { get { return StatisticalMath.AggregateFunction(functionType, from m in this select m.MeanRT); } } public double StDevRT { get { return StatisticalMath.AggregateFunction(functionType, from m in this select m.StDevRT); } } #endregion Public Properties } </pre> <br/><br/><hr class="sig">Thanks, -ja Wed, 25 Nov 2009 20:39:25 Z2009-11-26T21:47:00Z