For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
Notcie the first occurances of any "key/group" are removed in the result list. These entries are removed: (1, "foo1"), (2, "bar1") and (3, "baz")
I have no clue how to do this. I have tried to create a solution, but I don't know how to find the first entry of a group and remove it using LINQ. The .Distinct() and .First() methods seems needed in someway, but I cannot figure it out. I'm sure I can hack something ugly with foreach loops and new lists, but I would prefer a solution with LINQ.
I am running a Windows Service that executes successfully every 10 minutes. It instantiates an in house dll file and calls a method to do some process. This dll file logs everything throughout the process. Now the problem is I have no clue where this log file is anymore!!
Normally when we use this dll file and call its methods, it will create a folder called "Custom" inside the application path with log files.
I do not see any Custom folder anymore even tho my code runs and I see the results.
Thanks for your reply. The registry key only holds the path for the service executable file. And I already know where my service has been installed. I can also see the dell files in there. But I do not see the custom folder and log files that the dll file is generating. They are not in that path.
to make sure what file operations are executed, use Process Monitor[^] as Dave already suggested.
My best guess is this: as a service, your code is using C:\Windows\system32 as its default directory; and it won't have sufficient privileges to create a folder or file there, so nothing gets created, and the exceptions got caught and swallowed (which is always a bad idea). If correct, I suggest you set another default path before calling your DLL, using a location that is not full of system files.
As soon I instantiate a class which implements IDisposable as a member in one of my own classes I make my class also IDisposable; this e.g. in case I instanciate AutoResetEvent or any other synchronization stuff.
My colleagues argue I'm too nitpicking.
So my simple question: Am I to nitpicking in this case?
Btw: I break my rule in case I instantiate e.g. Font
Thank you very much in advance for your comments.
It does not solve my Problem, but it answers my question