Search:
Type: Posts; User: Jason Isom
Search:
Search took 0.04 seconds.
-
October 18th, 2007, 07:38 AM
Or, if you want to initialize the constants at runtime you can use the readonly attribute and initialize the constants in the constructor.
...
-
April 13th, 2007, 01:52 PM
I believe what you're looking for is, "XOR". I've added the parenthesis for clarity.
if((example1 > 10) ^ (example2 > 10))
Console.WriteLine("Yep...");
-
February 8th, 2007, 07:42 AM
Hmm. My installation of Visual C# Express Edition does that change automatically for me, unless I have weird errors before that line of code (ie, leave off a semi-colon, curly-brace, or forget to end...
-
February 2nd, 2007, 07:59 AM
Assuming you're using Visual Studio C# 2005, follow these instructions on adding the connection string.
Then add a reference to the System.Configuration.dll, and anywhere in your code that you...
-
January 16th, 2007, 09:30 AM
If you don't want to reinvent the wheel, you can download the Microsoft Baseline Security Analyzer. The advantage is that the analyzer can determine which updates are needed for that system, which is...
-
January 11th, 2007, 09:21 AM
Do you want to stop execution of the first form until the second form is opened and closed? Or until the second form is completely opened?
If it's the former, you could use .ShowDialog() instead...
-
December 20th, 2006, 07:56 AM
You didn't mention that you had a loop creating the classes, and then for each class instance you had another loop running within a method. :p
Either way, it sounds like you understand the...
-
December 15th, 2006, 09:39 AM
I haven't tested this, but:
File.AppendAllText("fileToAppendTo.txt", File.ReadAllText("fileToAppend.txt"));
-
December 13th, 2006, 08:37 AM
Because you wouldn't be re-seeding your Random object every function call. You'd be re-seeding it every time you created an instance of that class that contains the declaration for your Random...
-
December 13th, 2006, 07:36 AM
You can make the Random declaration a little more global, perhaps making it a private member of the class that contains the function and initialize it in the constructor for that class.
You're...
-
November 17th, 2006, 03:28 PM
If you've set it up exactly like I have it, you can open Microsoft Visual C#, right click the textBox you're trying to apply the event to and select properties. Then in the properties window, there...
-
November 17th, 2006, 07:46 AM
There is a bunch of different ways you could do this, but an answer closest to the approach you're taking now:
private bool x_Turn = true;
private void textBox_Click(object sender, EventArgs e)...
-
November 16th, 2006, 04:31 PM
Can you post a minimal solution that demonstrates the problem from your code? The reason I ask, is that just saying that you have BeginUpdate and EndUpdate isn't enough. If you have BeginUpdate and...
-
November 16th, 2006, 02:03 PM
Try the following:
ListView.BeginUpdate();
while(TheReader.Read())
{
ListViewItem lv = new ListViewItem();
MyObj my = new MyObj();
my.name = TheReader.GetString(0);
-
November 16th, 2006, 10:40 AM
Did you set the ShortcutsEnabled property to false?
-
November 15th, 2006, 01:13 PM
Is there any way that the constructor for MyRequest to return null?
-
November 15th, 2006, 11:34 AM
DirectoryInfo di = new DirectoryInfo(@"C:\parent\child");
Console.WriteLine(di.Parent.FullName);
and
DirectoryInfo di = new DirectoryInfo(@"C:\parent\child\");...
-
November 15th, 2006, 11:19 AM
This is just a stylistic issue, but you should be consistent with whatever way you choose. I personally use lower case for all types and I use the capitalized version to access the static members of...
-
November 15th, 2006, 07:54 AM
Just curious, why does ADONetForm1 inherit from class Form, when it doesn't even appear to do anything but call another Form (specifically, Form1). I don't even see a call to...
-
November 14th, 2006, 01:24 PM
Is the file on your computer? You could try the following:
foreach(Byte b in File.ReadAllBytes(@"c:\test\sunset.jpg"))
Console.Write("{0} ", b.ToString("X2"));
-
November 14th, 2006, 09:37 AM
System.Environment.OSVersion
http://msdn2.microsoft.com/en-US/library/system.environment.osversion.aspx
-
November 13th, 2006, 07:35 AM
I wonder if it would be better to ping the machine (via code) and if you get a response, then check if File.Exists(...)
I ran into a similiar problem checking the status of various Windows...
-
November 2nd, 2006, 07:36 AM
Unless I'm misunderstanding you, can use one of the following, depending on whether you want to send the keystroke and wait for the action to take place, or continue without waiting...
...
-
October 31st, 2006, 10:13 AM
Without seeing your code, I can only assume you did this:
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.Start(pathToFile);Instead of:...
-
October 31st, 2006, 07:40 AM
I'm fairly sure that the operating system would clean up the process after the process ended. The Process class does maintain some information about the process, such as the Process.ExitTime and...
|
Click Here to Expand Forum to Full Width
|