Forum: C# Apr 16th, 2009 |
| Replies: 7 Views: 4,759 To use the select, try this:
DataRow[] rows = table.Select("[First]='Lance'");
if(rows.Length > 0)
{
Console.Write("{0} ", rows[0]["ID"]);
Console.Write("{0} ", rows[0]["FIRST"]);... |
Forum: C# Apr 16th, 2009 |
| Replies: 3 Views: 800 Simple, the first while loop already read through the entire data reader, so there is nothing left to read by the time you get to the last while loop.
Seems that you are going about it the hard... |
Forum: C# Apr 7th, 2009 |
| Replies: 38 Views: 2,030 Welcome, its nice to be able to help and work on something other than the complex code I typically deal with everyday in my job.
Yes you can have multiple forms and navigate between them using... |
Forum: C# Apr 5th, 2009 |
| Replies: 38 Views: 2,030 Okay
Got the project.
Below is the Clear button event handler.
An explanation follows.
private void btnclr_Click(object sender, EventArgs e)
{
Label lbl; |
Forum: C# Apr 4th, 2009 |
| Replies: 38 Views: 2,030 Okay,
No problem on the newB questions, everyone is a NewB at some point.
Does not look like you need to convert the text to integer, the (i+1) that you are assigning to the Text, is already an... |
Forum: C# Apr 4th, 2009 |
| Replies: 38 Views: 2,030 The container should be the table (panel) not "this".
So instead of creating the labels and adding them to this
this.Controls.Add(lbl);
use
panel1.Controls.Add(lbl);
// Jerry |
Forum: C# Mar 22nd, 2009 |
| Replies: 3 Views: 3,149 Yes, the for--loop is inside the thread method. |
Forum: C# Mar 4th, 2009 |
| Replies: 13 Views: 1,666 Okay, I see you are getting nowhere, so I will give you the code to do this:
private void DoSomething()
{
string ConnectionString = "Data Source={0};Initial... |
Forum: C# Mar 1st, 2009 |
| Replies: 5 Views: 316 Hopefully this will make more sense to you.
You declare a delegate method with no parameters. You want to assign two instances of this delegate and each will be assigned to a seperate method.
... |
Forum: C# Mar 1st, 2009 |
| Replies: 14 Views: 1,101 Liz,
honeybits already failed the assignment. Asking for information on what went wrong is an appropriate reaction from someone that is interested in learning.
The prior answers in this thread... |
Forum: C# Feb 15th, 2009 |
| Replies: 2 Views: 514 If you really don't need an SQL Server, then you can use XML.
Let me explain, On many projects I use a locally saved DataSet for all kinds of purposes, storing configuration, multi-media, and even... |
Forum: C# Feb 14th, 2009 |
| Replies: 10 Views: 907 StringBuilder is (as you know) an array of char.
So you can either loop through getting the first space to detect the word, and start looking for the return\line feed '\r\n' or just convert it to... |
Forum: C# Feb 10th, 2009 |
| Replies: 1 Views: 316 char[] space = new char[1] { ' ' };
Console.WriteLine("Enter in numbers");
int nAnswer;
string[] answer = Console.ReadLine().Split(space
,StringSplitOptions.RemoveEmptyEntries);
... |
Forum: C# Apr 24th, 2008 |
| Replies: 11 Views: 11,430 Since this thread has been dragging on for some time, and there have been a number of members wanting to see how to do this, I went ahead and created a simple demo project in VS2005, although it... |
Forum: C# Apr 14th, 2008 |
| Replies: 7 Views: 696 First off, your scoping is wrong.
You have declared this in your constructor:
col c1 = new col();
The milisecond that your constructor exits, c1 is out of scope and ready for the garbage... |
Forum: C# Apr 13th, 2008 |
| Replies: 4 Views: 5,673 big_B,
Okay, there are several ways to do it, so this example is but one of them.
I have two forms , first form has a button, second form has a timer, and two labels.
The one second timer simply... |
Forum: C# Apr 11th, 2008 |
| Replies: 2 Views: 15,720 Here is a simplified way of doing it.
Typically, If using a database, I would avoid using the category class all together
but that is not what you were asking for.
Anyway, All this form has is a... |
Forum: C# Mar 27th, 2008 |
| Replies: 7 Views: 3,140 The code below returns the 6 parts you were looking for.
The seps var is now a string array instead of char array.
Using the string array in Spit with the remove emptry entries option.
... |
Forum: C# Mar 1st, 2008 |
| Replies: 5 Views: 13,480 Once you get all the stuff Ramy told you to do on your form, use the CellClick event of the grid to get at the data on that row.
You must check to be sure the user has selected a valid row. Row... |
Forum: C# Oct 3rd, 2007 |
| Replies: 17 Views: 10,106 It is true that a method can only return one value, however that value can be an array of values.
private object[] getSomeData()
{
object[] mydata = {256, "Here's you daddy"};
return... |
Forum: C# Mar 3rd, 2007 |
| Replies: 3 Views: 7,343 What you need is a place in your MyProgram.cs class to store the command line arguments received in the constructor (Main).
Something like public string SelectedFile;
In the Main constructor,... |
Forum: C# Feb 21st, 2007 |
| Replies: 5 Views: 24,001 Hey Shadowwrider,
<code>
ArrayList ar = new ArrayList();
object[] myarray = new object[2];
</code>
ArrayList comes from the System.Collection name space. I find it very useful, and will... |