Good resources to learn WMI in .NET?
I'm looking for recommendations for good resources are there out there to learn WMI. Interested in all types; books, online, webcasts, etc. ...
I'm looking for recommendations for good resources are there out there to learn WMI. Interested in all types; books, online, webcasts, etc. ...
I'm trying to allow an attachment from an email open in Novell GroupWise to be dropped into my C# WinForms application. The standard .NET functionality doesn't work. In the DragDrop event of a control, e.Data.GetFormats() returns the following. FileGroupDescriptorW FileGroupDescriptor FileContents attachment format I can get the file...
Hi, I'm implementing the ReadXml() method of IXmlSerializable and I figure using XPath is probably the nicest way to do this. However, ReadXml() needs to handle the reader position properly. So given that my WriteXml() produces something like this: <ObjectName> <SubNode>2</SubNode> <SubNode>2</SubNode> </ObjectName> Is there a ...
Hi, I am attempting to use Linq to project each row from a DB query into a dictionary that has a custom type as its value. I am unsure of the LINQ syntax to do this? This is my current attempt (which doesn't compile, but should demonstrate what I am trying to do). I am having trouble with the 'select new...' part. public class MyClas...
I want to call WaitHandle.WaitOne(TimeSpan) in .NET, but I'm on the STA thread and it pumps messages while waiting. For reasons that are beyond the scope of this question, I need to wait without pumping. How can I wait for a WaitHandle to be signaled without pumping messages? It seems in some scenarios that WaitHandle.WaitOne does not...
Hello everybody,I have some question which puzzled me for a long time. What is the relationship between CLR and one process created by OS? What steps the CLR is loaded when we double-click an "Console Application" or "Windows Forms Application"? I found two methods: _CorExeMain() and _CorBindToRuntimeEx(). What's the role of them? ...
Regular expression languages use \B to include A..Z, a..z, 0..9, and _, and \b is defined as a word boundary. How can I write a regular expression that matches all valid Spanish words, including characters such as: á, í, ó, é, ñ, etc.? I'm using .NET. ...
and if the answer is "it depends", could you provide a short explanation why ? ...
I have C# code that is trying to get the LocalPath for a executing assembly using the following line of code Uri uri = new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath; This piece of code performs fine for all the variety of paths. It started to fail giving the right AbsolutePath and Localpath because the executing assembly ...
Lets say I have an old application which will try to load an external assembly. The old application is compiled to CLR 2. The new assembly is compiled to CLR 4. I would like to be able to run that old application inside CLR 4. I remember there was some xml manifest magic involved. How can I create that manifest xml file to tell that...
I want to replace text inside cdata section but when I simply trying to add text to it I lose CDATA definition. I have a XML like this: <title><![CDATA[string]]></title> When I try to update this field with new value: myXmlNode.SelectSingleNode("title").InnerText = TextBoxName.Text; Output is <title>string</title> How do can I...
I am writing a scheduled job to mimic a SQL Server maintenance plan for SQL Express. (I have to do this because SQL Agent and related tools don't exist for SQL Express) One of the steps is to do a database integrity check. The TSQL for this is: DBCC CHECKDB(N'Northwind') WITH NO_INFOMSGS How do I know if an error occurred during ex...
Is there anything like Ruby gems for .NET? ...
How to provide an undo / redo using bindings in WPF? e.g. You implement a master-detail view with bindings. After editing your changes were saved automatically using binding. Then you want to undo the changes. Is there something ready-to-use in the binding for WPF? Does WPF provide some structures or interfaces for? This question is n...
I have a TrackBar and already have the Scroll event treated, but it may trigger 10 times during a user scroll, and I would like to update a file when the user finishes scrolling. How do I sense the "end of scrolling" ? Would MouseUp and KeyUp do for this purpose ? Thx. ...
I'm looking at using a System.Timers.Timer in a windows service. I would like to know how reliable and accurate they are. In particular: Are there any guarantees about how often they will run? What happens when the processor or memory are overloaded? Will the ElapsedEventArgs.SignalTime always be accurate under such circumstances? ...
Hi there, If I do not care about a thrown Exception. Can I code in a way as not to create it? In other words, can an Exception be thrown but no Exception object be created? An example - Simple example using a System.Net.Sockets.Socket Socket acceptingSocket; acceptingSocket.Blocking = false; while(condition) { try { ...
I have a .NET console application that needs to generate some HTML files. I could just construct the HTML in a StringBuilder and write the contents out to a file, but I was thinking it would be nicer to use some kind of template file with placeholders for where the data goes and then process my data through it at runtime. I'm guessing t...
The code below generates a warning CS3006 "Overloaded method MyNamespace.Sample.MyMethod(int[])' differing only in ref or out, or in array rank, is not CLS-compliant". Is this warning valid, i.e. is this genuinely not CLS-compliant? I'd have thought an explicit interface implementation would not count as an overload. [assembly: CLSCom...
Hi, I want to make a UserControl which holds and moves other controls within itself. I worry that the Controls collection can be used to destroy all the internal logic of the UserControl. Remembering that the .Net Framework TableLayoutPanel locates its own Controls, I created a 30x30 TableLayoutPanelm each cell containing a square Label...