I'm trying to write a little web.config reading class, and want it to be available for all .net framework solutions I am writing.
Everything is going fine, except for .net 1.1 and below I need to use System.configuration.configurationsettings.appsettings and for after 1.1 am using
System.configuration.configurationmanager.appsettings.
...
If I have two DirectoryInfo objects, how can I compare them for semantic equality? For example, the following paths should all be considered equal to C:\temp:
C:\temp
C:\temp\
C:\temp\.
C:\temp\x\..\..\temp\.
The following may or may not be equal to C:\temp:
\temp if the current working directory is on drive C:\
temp if the curren...
I have a WPF test app for evaluating event-based serial port communication (vs. polling the serial port). The problem is that the DataReceived event doesn't seem to be firing at all.
I have a very basic WPF form with a TextBox for user input, a TextBlock for output, and a button to write the input to the serial port.
Here's the code:
...
i know this code dont work but is describes good what im trying to do, i want to run the code inside the if check when Lastwritetime is greater then oldvalue date.
private void timer1_Tick(object sender, EventArgs e)
{
DateTime lastWriteTime = File.GetLastWriteTime(@"C:\temp\test_folder\TestFile.txt");
if (lastWriteTime.ToStrin...
What we're looking to do is determine if a group header has been clicked, like the "Hard Disk Drives" or the "Devices with Removable Storage" headers in the My Computer on Vista/7 screen. This has to work in XP.
We can detect when a mouse is in the region, and then trap a click, but we'd like to know if there is a specific event.
...
I am writing a unit test for some thread locking logic, so as to make the test more likely to fail quickly; I wish to have all the threads switch between each other very often and at random times.
I know this will not prove we don’t have any bugs, but at least it should make the bugs show up more often.
Thanks to everyone saying "don...
I've been tasked with researching some .NET code that isn't mine. It's a little hard to figure out because there are so many hooks in different areas. In other words, everything seems to be very highly coupled.
I'd like to be able to do the following:
Very easily see a hierarchical (tree) view of projects and their direct dependencies...
I have a project with a simple nested repeater. When i click the button, the OnItemCommand event is not called but the OnItemCreated is called (however, it does not call the Page_Load event handler). What am I misssing?
MARKUP
<table width="100%">
<tr>
<td>my row</td>
<td>my description</td>
</tr>
<asp:Rep...
Hi,
after a child collection with one item in it gets lazy loaded when performing an SQL select on the parent, an update statement is executed for this child afterwards - without explicitly calling update.
Parent mapping:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
namespace="ParentEntity"
assembly="ParentEntity">
...
I think my question is "no comment", and I must say is is not a bot-net.it is for education.
please tell me if this kind of question (hacking related) is not allowed in stackoverflow.
Edit:
While(Countries::C_Iran::LastMessage::Nuclear>0.05)IAEA::GetCountryA(Countries::C_Iran::Handle)->Boycott++;
if(IAEA::GetCountryA(Countries::C_Ira...
I'm the only developer working in a very small company. I currently use VisualSVN on Windows on my development machine as my VCS. This is problematic because I can't get to my projects outside the IT firewall, and my colleague can't integrate his content into my projects.
We (my PM, who develops content for me) are very interested in a...
I'm having trouble using the SQL BCP process to load up my tables with data. I'm calling it from a .NET application, so I execute the xp_cmdshell executable to run the bcp command. Here is what one of these commands looks like:
EXEC master..xp_cmdshell 'bcp "[D001Test.Restore].[dbo].[GeneralComments]" in "<DataFile>" -q -c -t "|_|" -r "...
Hi,
We've come up with a strategy to handle backward compatibility when there is a breaking change between two versions. We load the previous version assemblies in the current AppDomain, deserialize some data with the old version types and then convert these into their equivalent in the new version.
Are there any pitfalls with this ap...
I have a stored procedure that has a parameter called UserName and in my code behind I have a SqlCommand object that I add the parameters to with the Add method. But for some reason when the command object tries to run the ExecuteReader method, it throws an exception. I am totally at a loss and have no idea why it's not recognizing the p...
Every single flavor of regex I have ever used has always had the "." character match everything but a new line (\r or \n)... unless, of course, you enable the single-line flag.
So when I tried the following C# code I was shocked:
Regex rgx = new Regex(".");
if (rgx.Match("\r\n").Success)
MessageBox.Show("There is something rotten in ...
I am attempting to make my GUI thread remain responsive-ish during long running operations. These operations must be synchronous as they are usually operations which are required to finish before the requested operation can complete.
I was attempting to do this with a background worker, monitors and a lock object. Essentially I want to...
I am programming in C#.NET. It is possible to abort the set procedure of a class property without throwing an exception?
Here is what I want to do...
public int RandomProperty
{
set
{
DialogResult answer = new DialogResult();
answer = MessageBox.Show("This process could take up to 5 min. Are you sure you want to conti...
I am working on a tool which audits access to existing web application. Existing app does not have any hooks in place, but my plan is to inject an IHttpModule by modifying web.config and log whatever I need to log during EndRequest event.
What I'm struggling with right now is: I cannot intercept what is application writing to an output ...
How do I determine if the Native images are being used without the Loader verifing the signature of the assembly at runtime, or even using the GAC'ed assembly?
I have complex system that we're experimenting with NGen but currently we're running the exe from the folder where all the DLL's are located due to a lot of late binding dependen...
I need a list of cultures that are supported by .NET 3.5, regardless of the OS used.
This seems to be quite a struggle to obtain, though I am not sure why!
Edit: Arghh, I was not aware that it is dependent on the OS, that would explain the lack of documentation. Any ideas on what is supported by Mac/Linux OS as well?
Thanks :)
...