Yes there is a way. In visual studio, go to the "View" menu, then "Other windows", then "Document Outline". From there find the RichTextBox and MenuStrip controls on the Document Outline tree, and...
Type: Posts; User: theoobe
Yes there is a way. In visual studio, go to the "View" menu, then "Other windows", then "Document Outline". From there find the RichTextBox and MenuStrip controls on the Document Outline tree, and...
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
namespace ConsoleApplication2
{
class Program
{
* cringes at the over-use of the "var" keyword. *
Random Class (System)
Have a read. :)
Sounds like a DataGridView is what you need.
Probably needs casting...
if(dr.Read())
username = (String)dr["username"];
Use square brackets...
dr["username"]
Returning to my earlier point about disposing your database objects, it is bad practice to leave database connections lingering, which is what you are...
OleDbDataReader dr = cmd.ExecuteReader();
And
if (dr.Read())
The clue was in the exception.
Also don't forget to Dispose cmd, db and dr, or better yet, use 'using' statements.
Use the full path. So, rather than...
[DllImport("MyLib.dll")]
...you must use something like...
[DllImport("c:\inetpub\wwwroot\MyWebPage\bin\MyLib.dll")]
Just guessing here, but the delay could be from blocking on receive. My guess is based on you using Send rather than BeginSend.
You mention your local IP address being ipv4, so I'm assuming your "public(remote)" ip address is ipv6? I've never used ipv6 before, but a quick test...
// a random ipv6 address
String test_ip...
Nevermind. ConcurrentDictionary seems to be what I need.
using System;
using System.Collections.Generic;
namespace core.Extensions
{
class ConcurrentList<T>
{
private List<T> Items { get; set; }
private object Locker { get;...
You might want to learn the basics of C# before worrying about things like connecting to databases. Variables prefixed by an access modifier would never be found in a constructor.
Since you don't appear to need the needle's starting index or anything else other than a bool to confirm the needle's existance in the haystack, you could use .Contains instead...
String needle...
There are two ways that immeditately spring to mind. First is to pass the arguments in the Process.Start, eg.
String name = "foo";
String password = "bar";
String args = "name=" + name +...
What is the exception message? Normally when the Xml reader fails to read a document it will tell you where it failed eg. (3, 4) meaning column 3, row 4.
You could use some win32 functions to get the text content of an external control. You gave the example of notepad:
using System;
using System.Text;
using System.Runtime.InteropServices;...
System.Speech.Recognition Namespace ()
You could consider using the BackgroundWorker object which includes a convenient RunWorkerCompleted event which fires when the thread dies.
You use P/Invoke ( Platform Invoke Tutorial (C#) ) to communicate with unmanaged libraries from C#. I have to say though, using P/Invoke to perform such a very simple task as calculating a character...
ListBox.SelectedIndexChanged Event (System.Windows.Forms)
Use this event to change the contents of the label and picturebox.
If you're intending to have many clients connecting to your server at the same time I recommend you avoid "thread per client" as it will end up slowing your computer down. Instead you could consider...
Strangely, changing the read length to 8 results in a byte array containing 16 elements. The 8 bytes expected in the OP's expected output, followed by an additional 8 bytes. I don't really...
You're welcome.