|
The weird thing is that it doesn't give an error while working inside VS.
I will try try-catch block with printing out exception content.
|
|
|
|
|
Thanks to your help I found where the error is. But I can't understand why it throws an error.
Here is the code:
string gorev = null;
string pcadi = "*****";
WebClient wc = null;
Stream s = null;
StreamReader sr = null;
try
{
wc = new WebClient();
s = wc.OpenRead(main + get + "?updatecheck=" + pcadi);
sr = new StreamReader(s);
gorev = sr.ReadLine();
}
catch { gorev = null; }
finally { sr.Close(); sr.Dispose(); s.Close(); s.Dispose(); wc.Dispose(); }
|
|
|
|
|
When you use catch(Exception exc) { Console.WriteLine(exc.ToString());} or something similar you will get all available details about the exception often including the line number. And it is wise to tell Visual Studio (or any other IDE) to always display line numbers in editor windows, so now you know exactly which line goes wrong.
BTW: The fact that a program sometimes works just fine does *not* prove it is correct.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
I think that some versions of VS allow you to attach the debugger to a managed application. Not sure how you would go about this though - I use the Express edition
|
|
|
|
|
Hi Experts,
am working with c#.net 3.5, Windows Application
How can i add a default image to every row of my datagridview?
please help me out.
Thanks In Advance.
|
|
|
|
|
The easiest way to do this is to use an unbound DataGridViewImageColumn.
Something like this:
DataGridViewImageColumn imageCol = new DataGridViewImageColumn();
imageCol.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
imageCol.ImageLayout = DataGridViewImageCellLayout.Normal;
imageCol.Frozen = true;
imageCol.Name = "Image";
imageCol.HeaderText = "";
imageCol.DisplayIndex = 0;
imageCol.Image = genericImage;
dataGridView1.Columns.Add(imageCol);
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi Guys
i have an array below
string stringArray = new strinArray[12];
stringArray[0] = "0,1";
stringArray[1] = "1,3";
stringArray[2] = "1,4";
stringArray[3] = "2,1";
stringArray[4] = "2,4";
stringArray[5] = "3,7";
stringArray[6] = "4,3";
stringArray[7] = "4,2";
stringArray[8] = "4,8";
stringArray[9] = "5,5";
stringArray[10] = "5,6";
stringArray[11] = "6,2";
i need to transform like below
List<List<string>> listStringArray = new List<List<string>>();
listStringArray[["1","3","4"],["1","4"],["7"],["3","2","8"],["5","6"],["2"]];
how is that possible?
modified on Tuesday, May 26, 2009 11:27 AM
|
|
|
|
|
"someString".Split and logic.
|
|
|
|
|
i know to split man.i actually need to logic
|
|
|
|
|
The logic isn't the hard part here.. actually there is no hard part at all.
|
|
|
|
|
Try looking at the documentation for the generic list constructor. If you can't figure it out from there you may have a PEBKAC error.
|
|
|
|
|
Ennis Ray Lynch, Jr. wrote: you may have a PEBKAC error
Not heard that one before - thank you (and google for the explanation)!
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
wow, is your code compiling? It's very strange.
To convert an array to list, try this wonderful website : herehere
|
|
|
|
|
if easy so you write for me here man
|
|
|
|
|
no one is going to write you code here, you can go to this site[^] if that's what you're looking for.
|
|
|
|
|
do you need money man?
you know something please share me but shut up.
|
|
|
|
|
Go rot in a hole, stop thinking people will do your work for you for free. What the hell do you think this is??
|
|
|
|
|
i dont want to work for me anybody what do you mean?i dont understand.r u drinking?
|
|
|
|
|
bluetx wrote: if easy so you write for me here man
No one is going to code for you. Go to rentacoder if that's what you want. Otherwise, read the other posts and learn something.
|
|
|
|
|
who are you this?
you say again again again renta renta renta?
do u work for renta
|
|
|
|
|
I've done work for people through the site rentacoder, which facilitates easy communication between people such as yourself looking for work to get done and coders / programmers looking for quick (or lengthy) jobs.
|
|
|
|
|
bluetx wrote: i dont want to work for me anybody what do you mean?i dont understand.r u drinking?
The question should be 'Are YOU drinking?' as what you have just said makes no sense.
My failometer is detecting vast quantities of FAIL!
"Its SQL - hardly programming..." (Caslen)
|
|
|
|
|
bluetx wrote: if easy so you write for me here man
That is not the point, if people come here asking for advice and help then others will help. If people come here asking for people to write code for them because they are too lazy then others will kindly tell them where to go i.e. switching off the computer and going to teach sports.
My failometer is detecting vast quantities of FAIL!
"Its SQL - hardly programming..." (Caslen)
|
|
|
|
|
you didnt understand me. i said write code if easy.its a gibe.you are very emotional.wake up
|
|
|
|
|
You sir, are a tool.
My failometer is detecting vast quantities of FAIL!
"Its SQL - hardly programming..." (Caslen)
|
|
|
|