Forum: C# 30 Days Ago |
| Replies: 3 Views: 340 You have to show us what you got before we can help you |
Forum: C# 30 Days Ago |
| Replies: 3 Views: 404 you need to have an open connection, just as it says, right before you call execute reader call this
if (conn1.State != ConnectionState.Open)
{
conn1.Open();
}
... |
Forum: C# Apr 7th, 2009 |
| Replies: 8 Views: 581 its because you are using an untyped list for one, but you didn't have an else statement
if (yourValue == "b")
{
break;
}
else
{
numbers.Add(Convert.ToInt32(yourValue)); |
Forum: C# Apr 7th, 2009 |
| Replies: 8 Views: 581 you don't always have to use that way, but you can
you could also do something like this
foreach(int num in numbers)
{
Console.WriteLine(" " + num);
} |
Forum: C# Apr 7th, 2009 |
| Replies: 8 Views: 581 this will loop through all the values in your array
IEnumerator basically means you can use it to iterate your data
lets say you have 1, 5, 3, 8 in your array
this will print out
1 5 3 8 |
Forum: C# Mar 19th, 2009 |
| Replies: 4 Views: 588 The exe is the compiled solution, all exes have already been compiled as well
if you are in a winforms app, it needs to be compiled before running it, if you are in asp.net you can set the project... |
Forum: C# Mar 17th, 2009 |
| Replies: 4 Views: 3,251 In the past I have used SharpZipLib
http://www.icsharpcode.net/OpenSource/SharpZipLib/ |
Forum: C# Mar 11th, 2009 |
| Replies: 2 Views: 1,360 System.Diagnostics.Process.Start("calc") |
Forum: C# Mar 6th, 2009 |
| Replies: 2 Views: 670 of course, the same as you would any other property
public int[] LendMoney
{
get{return lendMoney;}
set{lendMoney = value;}
} |
Forum: C# Mar 5th, 2009 |
| Replies: 1 Views: 976 from the ui we get a filepath
string filePath = this.textBoxPath.value;
//We call our class like this from the ui
BusinessLogic logic = new BusinessLogic(filePath);
logic.Load(); |
Forum: C# Mar 3rd, 2009 |
| Replies: 4 Views: 558 much more clear now, well if you really will have 50000 records at once or a large number of records, i would use the sql bulk insert
here's a link that should get you started in the right... |
Forum: C# Mar 3rd, 2009 |
| Replies: 4 Views: 558 a couple possible options is dependent on how you are accessing your data
if lets say you are looping through ids and running a select on each id, then that is very inefficient as far as the... |
Forum: C# Dec 2nd, 2008 |
| Replies: 28 Views: 1,632 right, then the exception is correct
uri is expected to be a registered prefix, and javascript is not, things are working properly!!! |
Forum: C# Dec 2nd, 2008 |
| Replies: 28 Views: 1,632 lol whoa, i thought you said it was microsoft |
Forum: C# Dec 2nd, 2008 |
| Replies: 28 Views: 1,632 right, but when that throws an exception, what is the linkItem? |
Forum: C# Dec 2nd, 2008 |
| Replies: 28 Views: 1,632 just to be sure we are still at the same place
what is the exact link that is passed in (what is linkItem) |
Forum: C# Dec 2nd, 2008 |
| Replies: 28 Views: 1,632 try with httpresponse and httprequest |
Forum: C# Dec 1st, 2008 |
| Replies: 28 Views: 1,632 i don't know about that trailing / with the .
what is the details on the exception?
try like this
http://msdn.microsoft.com/en-us/library/debx8sh9.aspx |
Forum: C# Dec 1st, 2008 |
| Replies: 28 Views: 1,632 what are the href's coming in as?
also capitalization
if it also says bad, then the exception didn't occur in that place, what are links coming in as, and what are they being resolved as? |
Forum: C# Dec 1st, 2008 |
| Replies: 28 Views: 1,632 are you meaning something like this?
foreach (HtmlElement link in webBrowser1.Document.Links)
{
bool isValid = false;
string linkItem =... |
Forum: C# Nov 28th, 2008 |
| Replies: 28 Views: 1,632 yes you did, now hopefully he will go down that path |
Forum: C# Nov 28th, 2008 |
| Replies: 28 Views: 1,632 you first post was close, you just needed to make your for loop call the second method, if true add it to the list, if false don't do anything |
Forum: C# Nov 25th, 2008 |
| Replies: 4 Views: 1,273 nice job man, much more rewarding when you find out how to do it, than when we just tell you |
Forum: C# Nov 25th, 2008 |
| Replies: 10 Views: 1,857 here's a simple example, probably overkill for what you need
http://www.c-sharpcorner.com/UploadFile/mahesh/ReadWriteXMLTutMellli2111282005041517AM/ReadWriteXMLTutMellli21.aspx |
Forum: C# Nov 24th, 2008 |
| Replies: 4 Views: 1,273 you are correct, String.split is the way to go to treat it the same as the tokenizer
the other way would be to use regex |
Forum: C# Nov 24th, 2008 |
| Replies: 2 Views: 823 make sure your reference is to C:\Program Files\Reference Assemblies\Microsoft\VSTO...... and not C:\Program Files\Common Files\Microsoft Shared\VSTO ....... |
Forum: C# Nov 21st, 2008 |
| Replies: 4 Views: 730 lol yeh man, it worked fine, will you post the whole class structure then? |
Forum: C# Nov 21st, 2008 |
| Replies: 8 Views: 1,257 just to make sure, you have used the full path
C:\folder\Data.xls?
what version of excel? |
Forum: C# Nov 21st, 2008 |
| Replies: 4 Views: 730 hmmm, compiles fine for me
you sure Expression.Valoper is the same class as Valoper? |
Forum: C# Nov 21st, 2008 |
| Replies: 12 Views: 3,913 for sure your events are registered? |
Forum: C# Nov 21st, 2008 |
| Replies: 12 Views: 3,913 I think you have an extra TextBox here, the only one you need is the textbox in the toolstrip
for the toolstrip textbox to change as you click on a url, make sure have this event in there
... |
Forum: C# Nov 21st, 2008 |
| Replies: 8 Views: 1,257 for one, you don't need to call WorkBookToOpen.ToString(), it already is a string
is workbooktoopen a valid path? and are you calling open first? |
Forum: C# Nov 21st, 2008 |
| Replies: 12 Views: 3,913 what are you wanting the TextBoxAddress to be?
i thought you were typing in a url and hitting enter |
Forum: C# Nov 21st, 2008 |
| Replies: 12 Views: 3,913 in that method run your check that i gave you from before
if ((int)e.KeyChar == (int)Keys.Enter)
{
//not sure what box has your url, but put it here
Navigate(toolStripTextBox1.Text);
} |
Forum: C# Nov 20th, 2008 |
| Replies: 12 Views: 3,913 capture keypress event from your form |
Forum: C# Nov 20th, 2008 |
| Replies: 12 Views: 3,913 are you catching the key press event and checking for enter?
if ((int)e.KeyChar == (int)Keys.Enter)
{
Navigate(toolStripTextBox1.Text);
} |
Forum: C# Nov 18th, 2008 |
| Replies: 8 Views: 1,257 you can use office pia's, then you have an object model to work off of
http://stackoverflow.com/questions/261374/efficient-method-to-enumerate-cells-in-an-excel-workbook-using-c
here's the... |
Forum: C# Nov 12th, 2008 |
| Replies: 11 Views: 735 if you use fxcop or code analysis in visual studio there is a rule CA1806 to 'do not ignore method results'
http://msdn.microsoft.com/en-us/library/ms244717(VS.80).aspx |
Forum: C# Nov 11th, 2008 |
| Replies: 11 Views: 735 think i found an answer
an enum is static !!!
http://msmvps.com/blogs/luisabreu/archive/2007/09/07/c-understanding-enums.aspx |
Forum: C# Nov 10th, 2008 |
| Replies: 3 Views: 581 i guess just to be thorough, he is what form2 could be
public class Form2 : Form
{
//all the other code
private int int_a;
public int IntA
{
get { return int_a; } |