I am trying to detect a users Steam games that are installed on their computer, I wish to be able to find the appropriate .exe for each installation and backtrack through the directory to get the full path.
I've realized that there are several different games that use the same name for the executable file (hl2.exe) but they are in diffe...
I have the following code:
public static class ScraperMasterUriDetails
{
public static Dictionary<Guid, string> MasterUriDetails;
}
However I've decided that I need to add an integer to the dictionary Dictionary<ScraperMasterUriDetails>, so I thought I'd add properties and a few parameters to the constructor.
But,...
I want to create a taskbar in C#, but I don't know where to begin.
I don't know how to get the current open windows.
I don't know how to get the system tray icon's.
The second is the one I have more problems with. I think I found a solution for the first one on the internet. (http://www.c-sharpcorner.com/UploadFile/satisharveti/Enhanced...
I am using Testdriven.net to run NCover on my assemblies. However, I need to exclude certain methods from the coverage report. How can I do this?
...
I am trying to reproduce something that System.Xml.Serialization already does, but for a different source of data.
For now task is limited to deserialization only.
I.e. given defined source of data that I know how to read. Write a library that takes a random type, learns about it fields/properties via reflection, then generates and comp...
Is quartz.net meant to support triggers of less than 1 second in duration?
I'm assuming no, as I don't see any method like TriggerUtils.MakeMilliSecondlyTrigger for example. I'm assuming therefore you would for such short durations be better looking at creating a thread and just using Thread.Sleep perhaps?
...
Does Dns.GetHostAddresses really get back all registered IPs?
That is DNS can have multiple IP's registered against a DNS name for round-robin type purposes (e.g. multiple proxy servers but give use one main DNS proxy server name)
But does the .NET method "Dns.GetHostAddresses(hostname)" really bring all of these registered IP addresse...
Is it possible to install Cosmos User Kit(A C# Operating System) with mono on mac?
...
I am getting a very frustrating issue:
System.Data.UpdateException was unhandled by user code
Message="Entities in 'MyProjectEntities.GroupingData' participate in the 'FK_GroupingData_AuditTrail' relationship.
0 related 'AuditTrail' were found. 1 'AuditTrail' is expected."
This happens when I try to add an object to the data...
I think this question is like clay pidgeon shooting.. "pull... bang!" .. shot down.. but nevertheless, it's worth asking I believe.
Lots of JS frameworks etc use JSON these days, and for good reason I know. The classic question is "where to transform the data to JSON".
I understand that at some point in the pipeline, you have to conver...
I trying to write my own Event Aggregation class and i go some articles but i want to go step by step with this pattern, for example i want to create it with 2 simple classes, such as User class and Email notification class, so that when user change his password an email sent to him.
I don't want to care for now with generics, i want it ...
Dear ladies and sirs.
Observe the following simple class and its respective XAML:
namespace NetworkCatcher.Entities.Server.Cfg
{
public sealed class Settings : ISupportInitialize
{
private static readonly TimeSpan MinCrashRecoveryDuration = TimeSpan.FromSeconds(15);
private static readonly TimeSpan MaxCrashRecoveryDuration =...
I have been doing quite a bit of work lately that involves taking stored procedure calls and mapping them to private DTO classes. I was thinking the other day there has to be an easier way. So far this is what i have come up with:
CodeSmith - OK solution but it will be a no go where i work. The budget is pretty tight right now.
Typed...
Given that you have found a process that you wish to execute a function call to, is it possible to call a function and get a return value from that process. (possibly using reflection or something similar?)
For example, suppose the process I was interested in was always the 1st process returned (I know it won't be), I would like to do s...
I have a gridview to display data, and one of columns was the file path (string). I want to when switch to edit mode, this column will be a editbox + a button, (so if the user click on the button, an OpenFileDialog will be show and he can select a new file)
How can I do that?
Thanks in advance
...
I have a class that contains some data and there are many threads use it:
class MyClass
{
static Dictionary<Key, Value> MyData;
static IEnumerable<Data> Data
{
get
{
return MyData.Values;
}
}
static void Reset()
{
MyData = GetMyData();
}
}
Sometime (say once in...
I think that the code below is good. But how can I write it in LINQ? how can I compare Employee type object in linq?
namespace GenericReplacement
{
class Program
{
static void Main(string[] args)
{
EmployeeComparer employeeComparer = new EmployeeComparer();
Employee employee1 = new Employ...
I have the following code inside a Form, and am attempting to find a way to load a project assembly referenced by the form called DataObjects. Using the following code, I only get six assemblies listed. Looking at the references for the project the form is in, there are thirteen assembly references. What is wrong here?
private void L...
Consider this code:
string dir = Environment.CurrentDirectory + @"\a";
Directory.CreateDirectory(dir);
FileSystemWatcher watcher = new FileSystemWatcher(dir);
watcher.IncludeSubdirectories = false;
watcher.EnableRaisingEvents = true;
Console.WriteLine("Deleting " + dir);
Directory.Delete(dir, true);
if (Directory.Exists(dir))
{
Cons...
Hello,
I'm tryng to serialize an object to XML by using C# with the following code:
memoryStream = new System.IO.MemoryStream();
Serializer.Serialize(memoryStream, this);
memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
streamReader = new System.IO.StreamReader(memoryStream);
...