|
We can have a constrictor in a static class (thought not a parameterized one).
Read more about this here[^].
|
|
|
|
|
Abhinav S wrote: We can have a constrictor in a static class
Does that narrow the scope of variables?
[Edit]Univote countered.
modified 11-Sep-12 14:12pm.
|
|
|
|
|
No. Think about it. You need to have the static initialized when an instance of a class is created.
|
|
|
|
|
i have a problem in my code for doing the slectedindex event.pls help
SqlCommand cmd = new SqlCommand("select firstname,phoneno from user1 where rollno='" + comboBox1.SelectedItem + "'", con);
SqlDataReader dr;
con.Open();
dr = cmd.ExecuteReader();
if (dr.Read())
{
textBox1.Text = dr[0].ToString();
textBox2.Text = dr[1].ToString();
label4.Visible = true;
label4.Text = "show";
}
con.Close();
|
|
|
|
|
What error are you getting ?
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
Null Reference Exception?
When you select a different value in a ComboBox, the previous element gets de-selected, causing a SelectedIndexChanged event. Now, nothing is selected, the SelectedIndex is -1. Next, the element you selected gets selected, causing the next SelectedIndexChanged event. And now it is really selected, and you can use it.
|
|
|
|
|
Hi
I want to use windows login box in my c# application which is secure and pass values using tokens. I do not want to create a custom login box. How to popup the login screen?
Thanks in advance,
Sai
|
|
|
|
|
|
Thank you very much ...
|
|
|
|
|
|
Is this a custom built? I do not want to use custom built. I did one myself using Active directory directory service reference and the company do not want it.
Thank you,
Sai
|
|
|
|
|
I have a web service stack trace where the method is called GetLoadTrace();
However, I can't seem to find what line the error occured in . Does the stack trace tell you ?
It just says GetLoadTrace()+90
GetLoadTrace()+155
What line did the error occur on then ? Does it NOT tell you ?
==================================================
--I am the STIG !!!!!!!!!!!!!!!!!
|
|
|
|
|
The exception is usually thrown in the method at the very top of the stack trace.
The stack trace does NOT tell you on which line the problem occured in a Release compiled application, only the method in which it occured.
|
|
|
|
|
It's not actually release/debug, it's whether a .pdb file is present ... but I don't think it's possible to make a .pdb for a release build so you can never get line numbers in a release stack trace.
|
|
|
|
|
BobJanova wrote: I don't think it's possible to make a .pdb
You can. A release build is not magic, the main difference is just that the debug version doesn't optimise the code. If you do a release build, take a look in your Release folder - you'll see a number of generated PDB files in there.
To prevent generation of release PDV files, select Project Properties > Build > Advanced > Debug Info: None (make sure the configration is set to Release when you do this).
|
|
|
|
|
Oh, I thought that the optimisations made it too hard for the compiler to know what to create.
If I'm using csc, and I use /debug to create a .pdb, then, is that still 'release' code (i.e. optimised etc)?
|
|
|
|
|
It's not release code if you use csc /debug . If you want to do the release build that you get with Visual Studio, just use csc.exe /optimize+ /debug:pdbonly . To just produce the release build without the pdb, just use csc.exe /optimize+ .
|
|
|
|
|
The compiler will know what to create easy enough.
My problem is with optimizations and code rewrite, are the line numbers going to be accurate??
|
|
|
|
|
I need to create a help file for an application. Not code comments but actual "how to use" help file for end users.
Which "tool" should I use?
Which tool have you used? Did you think it was good? Why?
Which tool shouldnt I use? Why not?
Thanks
bart
|
|
|
|
|
This isn't really an appropriate question for the C# forum. What you could do is download and test some of the help authoring tools to see which best suits your requirements.
|
|
|
|
|
Can you suggest a better forum?
bart
|
|
|
|
|
Possibly the lounge. And rather than post your question like this, I'd rephrase it to be a more general "does anyone have any experience with help authoring tools? I'm interested in which tools people have used to write documentation for end users, rather than API style documentation, and how they found them."
|
|
|
|
|
so you will answer in the lounge? Without any elephants?
bart
|
|
|
|
|
Some might - when you post, put in that I suggested that you posted there.
|
|
|
|
|
Good point.
We "use" Microsoft HTML Help Workshop 1.3 - it's old, and it's not good to use. (And we hardly ever use it, our help files are really outdated).
At a different company, the documentation guys used RoboHelp. It allowed for better help integration than the HTML Workshop, you could generate context-sensitive help downto the controls on a form. But I do not know how hard it is to use.
|
|
|
|