|
Does anyone know how to force the xmlDataDocument to include elements for nulls (from the dataTable in the dataSet) in the resulting xml?
I'm transforming the xml into an html table and without all the elements the columns are misaligned.
|
|
|
|
|
|
|
HI,
I have a requirment where in I have to show a child form without
losing the focus of the invoking form/mdi form.
My application shows a Popup window rising from the task bar.
This popup form is invoked by the main MDI form which handles
several events from the server. Based on the event type I create
an instance of the popup form and show the Popup form. During this
period the MDI form loses its focus. Once the Popup goes down, the
MDI form regains focus.
I have used ShowWindow(this.Handle, 4) API call which in turn is supposed to open
a form without focus.
But still this does not work.
Is there anybody who can suggest me the solution for this problem.
Any help/suggestion is hightly appreciated.
Regards,
Hitesh
hiteshsalian@yahoo.co.in
|
|
|
|
|
Hi,
I am having a similar problem. Have you found solution for this? If so, Please let me know...
Thanks
Muthu.
|
|
|
|
|
Can anybody tell me how can i determine the number of drives and drive letters in my system in C#? And also the size of each drive...
|
|
|
|
|
DriveInfo[] drives = System.IO.DriveInfo.GetDrives();
Each DriveInfo object will have TotalFreeSpace and a TotalSize property.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Cops & Robbers
Judah Himango
|
|
|
|
|
Environment.GetLogicalDrives()
xacc-ide 0.0.99-preview7 now with C#, C, C++, IL, XML, Nemerle, IronPython, Perl, Caml, SML, Ruby, Flex, Yacc, Java, Javascript, Lua, Prolog and Boo highlighting support!
|
|
|
|
|
I have just read Jeffrey Richter's article: "Garbage Collection: Automatic Memory Management in the Microsoft .NET Framework",I have a question about finalize.It says "A finalizable object can refer to other(finalizable and nonfinalizable) objects, prolonging their lifetime unnecessarily.".It also says "The runtime doesn't make any guarantees as to the order in which Finalize methods are called. For example, let's say there is an object that contains a pointer to an inner object. The garbage collector has detected that both objects are garbage.Furthermore, say that the inner object's Finalize method gets called first." I am confused the outer object's finalize method doesn't get called,so the inner object is reference by the outer object.Why does the garbage collector think that the inner ojbect is garbage.I notice the former uses refer and the latter used a pointer.Is this reason,otherwise why?
|
|
|
|
|
It's a two-pass process, first establishing what is garbage, then secondly collecting it.
When garbage collection kicks in, the CLR determines what is and what is not garbage by following object references from initial 'live' roots to one object to the next. All objects are considered garbage unless they are marked otherwise by this process. If the inner object is only referenced by the outer object, and the outer object never gets marked as 'live', then both objects are considered garbage.
The GC will then go on to collect them and you can't make any assumptions about in which order (I believe its in the order they are in memory).
Are you assuming that objects are deleted in Finalize in a similar manner to the general practice in a C++ destructor? This is not the case. My understanding is that Finalize is provided more to free up CLR resources than referenced objects.
Rob Philpott.
|
|
|
|
|
Rob Philpott wrote: Are you assuming that objects are deleted in Finalize in a similar manner to the general practice in a C++ destructor? This is not the case. My understanding is that Finalize is provided more to free up CLR resources than referenced objects.
You've got this part backwards. Finalize() is to cleanup non managed (and generally scarce) resources (ie handles, files) that the GC can't. If you've implemented a finalizer you should also should implement IDisposable, and dispose the object as soon as you're done (put the cleanup code in both) to free the nonmanaged resources immediately rather than waiting for the GC. The reason for doing the cleanup in both places is cya in case you or annother developer forget to dispose the object.
|
|
|
|
|
Hey
I'm looking for a list with all the "\" signals for strings.
I do know that \n is start another line, and \t is for tabbing,
but what \r is doing, and what other signs exist.
thanks!
|
|
|
|
|
Copied from MSDN Library:
Escaped character Description
\a
Matches a bell (alarm) \u0007.
\b
Matches a backspace \u0008
\t
Matches a tab \u0009.
\r
Matches a carriage return \u000D.
\v
Matches a vertical tab \u000B.
\f
Matches a form feed \u000C.
\n
Matches a new line \u000A.
\e
Matches an escape \u001B.
\040
Matches an ASCII character as octal (up to three digits); numbers with no leading zero are backreferences if they have only one digit or if they correspond to a capturing group number. (For more information, see Backreferences.) For example, the character \040 represents a space.
\x20
Matches an ASCII character using hexadecimal representation (exactly two digits).
\cC
Matches an ASCII control character; for example, \cC is control-C.
\u0020
Matches a Unicode character using hexadecimal representation (exactly four digits).
modified 12-Sep-18 21:01pm.
|
|
|
|
|
This seems to be copied from the documentation about regular expressions, not the C# documentation.
The escapes are quite similar, though.
|
|
|
|
|
You're right, that's the first one I found. But as you said they're pretty much the same.
I just removed some of the regex-specific stuff from my original posting to not to confuse him.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
|
Hi:
What is involved in setting up a serial port (RS232) under .NET and specifically, using C#?
Does C# offer anything that supports this or do I have to drag some Win32 DLL into it?
There is an example on this site but it uses a SerialPort class that is supposed to be part of the "System.IO" name space. I'm using Visual Studio 2003. I can't find that in any of my documentation.
I specifically need to set up asynchronous communication so I need a background thread to service incoming characters.
Thanks in advance to anybody who responds.
Cheers,
Mark
|
|
|
|
|
This link might shed some light on the matter -
http://msdn.microsoft.com/msdnmag/issues/02/10/NETSerialComm/default.aspx
|
|
|
|
|
Thanks Gavin. This looks exactly like what I am looking for.
Cheers,
Mark
|
|
|
|
|
in crypting what does need cryptic.IV.
Have to be the same of the crypting key?
|
|
|
|
|
The IV is needed for all ciphermodes but ECB. The can be anything and/or can be generated by GenerateIV(). The IV needs to be shared with the receiver of the encrypted data as well the decryption key.
xacc-ide 0.0.99-preview7 now with C#, C, C++, IL, XML, Nemerle, IronPython, Perl, Caml, SML, Ruby, Flex, Yacc, Java, Javascript, Lua, Prolog and Boo highlighting support!
|
|
|
|
|
There are several great articles on these things on Code Project. Do a search for cryptography and you should find them. A few even have nice little assemblies you can use to encrypt your data very easily if you don't mind using open-source encryption
-------------------------------------
Do not do what has already been done.
|
|
|
|
|
Hi folks,
I am trying to change the display name of Windows Service using DisplayName property of Service Controller class. But the change is not reflected, don't know why? Is it a bug or am I doing something wrong.
Reply soon.
Thanks in advance
Rajeev
|
|
|
|
|
rajeevr@interrait.com wrote: I am trying to change the display name of Windows Service using DisplayName property of Service Controller class. But the change is not reflected, don't know why? Is it a bug or am I doing something wrong.
From what I can see it is not possible to do what you want from the ServiceController class.
xacc-ide 0.0.99-preview7 now with C#, C, C++, IL, XML, Nemerle, IronPython, Perl, Caml, SML, Ruby, Flex, Yacc, Java, Javascript, Lua, Prolog and Boo highlighting support!
|
|
|
|
|
Hi leppie,
Thanks for your prompt reply. Why its not possible to change display name using ServiceController class and do you know any other approach to do this.
Regards
Rajeev
|
|
|
|