|
And ?
------------------------------ "The Soapbox has been so ..."
|
|
|
|
|
Automaticly!!
Not Manual!
nemanja
|
|
|
|
|
Create a custom control. Then you only have to create it once.
|
|
|
|
|
private void PopulateComboBox()
{
for (int i = 65; i < 91; i++)
{
comboBox1.Items.Add(Convert.ToChar(i));
}
}
|
|
|
|
|
Here is one way:
for (char i = 'A'; i <= 'Z'; i++) comboBox1.Items.Add(i);
---
Year happy = new Year(2007);
|
|
|
|
|
Well I didn't know you could increment chars. Assimilated
|
|
|
|
|
A char automatically converts to an int, I believe. It definatley does in c++.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Not automatically, you have to cast it.
A char in C# is a unicode character, while a char in C++ is actually not a character at all, but a byte.
---
Year happy = new Year(2007);
|
|
|
|
|
comboBox.DataSource = {'a','b','c','d','e','f','g','h','i','j','k' ... 'z'};
Just being funny. But itll work.
File Not Found
|
|
|
|
|
Here's another funny one.
public static class Alphabet {
public static IEnumerator Lower() {
for (char i = 'a'; i <= 'z'; i++) yield return i;
}
public static IEnumerator Upper() {
for (char i = 'A'; i <= 'Z'; i++) yield return i;
}
}
foreach (char i in Alphabet.Lower()) comboBox1.Items.Add(i);
---
Year happy = new Year(2007);
|
|
|
|
|
thats what I wrote the first time. But I created an interface first then I deleted the entire post because I was afraid someone would think I was serious.
File Not Found
|
|
|
|
|
Can someone give me an example pattern that matches:
$1.25
I can't seem to figure out how to match a literal "$" as it's not a valid escape character...
Thanks!
|
|
|
|
|
|
The $ character has a special meaning in regular expression (matching the end of the string). Use \$ to match a literal $.
---
Year happy = new Year(2007);
|
|
|
|
|
Nitron wrote: match a literal "$" as it's not a valid escape character...
As the other responses suggest, you should be able to escape the $. An alternative is to put it like this: [$] instead of escaping it.
|
|
|
|
|
You have to distinguish between Regex escape characters and C# escape characters.
If you escape a character for a Regex, you have to prefix it with a \. To write a \ in C#, you'll have to add another \.
So you'll have to use "\\$" or @"\$" in C#
|
|
|
|
|
Daniel Grunwald wrote: So you'll have to use "\\$" or @"\$" in C#
ahh... that makes sense. I was getting an error with \$, saying it wasnt an escape char, but \\$ might work... I'll try it tomorrow, thanks!
|
|
|
|
|
That [\\$] was it! Thanks, I would have never thought of that.
|
|
|
|
|
You may be able to just use Decimal.Parse if all you have is a money string.
File Not Found
|
|
|
|
|
hi People
I want to do this :
In the toolStrip i have one button and if i click that button textbox and butoon2 appear in toolStrip .Then if i click button 2 textbox disappear..
thx
nemanja
|
|
|
|
|
Trick question?
private void toolStripButton1_Click(object sender, EventArgs e)
{
toolStripButton2.Visible = true;
toolStripTextBox1.Visible = true;
}
private void toolStripButton2_Click(object sender, EventArgs e)
{
toolStripButton2.Visible = false;
toolStripTextBox1.Visible = false;
}
|
|
|
|
|
Hi people
Can you tell me how to find a word in rich text box ?
thx
nemanja
|
|
|
|
|
|
|
I have a program that the user double clicks and image and it shows in an image viewer (my own creation). However after closing the image viewer I can no longer delete the image from the file system. It says the File is in use. I have tried Disposing and Garbage Collecting, even Thread.Sleep to wait, but to no avail. How can I get the image viewer to relase the file even though it is long since disposed of?
Actually I think it might be a waiting issue since I got it to work in Debug mode but it continues to throw the error in Release mode.
Thanks for any ideas.
Brent
|
|
|
|