|
0) You probably want \w , not .
1) What is :b supposed to be?
2) Why are you putting the things you don't want in groups?
3) Product\s*:\s*(?'value'\w+)
4) Look into Expresso[^]
|
|
|
|
|
i want more buttons on the messagebox in c#. not only ok,cance,yes,no......
i want refresh,print..... on the messagebox. how to write code
|
|
|
|
|
|
Create your own form and have whatever buttons you want!
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
i want more buttons on the MessageBox
|
|
|
|
|
You can't, the only buttons available on System.Windows.Forms.MessageBox are the built-in ones.
If you want more buttons, you have to code your own message box form, as other people has already told you.
|
|
|
|
|
I want my car to do 300MPH, unfortunately it just was never built to do so. See the problem here?
|
|
|
|
|
J4amieC wrote: See the problem here?
Yes, a poorly constructed car?
only two letters away from being an asset
|
|
|
|
|
No. Need bigger pay check!!
|
|
|
|
|
URGENTZ! plz snd bggr pa chk!
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
|
|
|
|
|
There is exactly one way: MessageBox.Show("more buttons");
|
|
|
|
|
MessageBox.Show("5");
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
|
|
|
|
|
You seem to lack the ability to apply effort, you must already be doing forms to want to use a message box. It would take < 10 mins to make a simple message box with 100 buttons!
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
1) MessageBox (text,title{,icon{,button{,default}}})
2) if you want more Functions, you can Customize your Winform;
it's very easy.
modified 27-May-14 5:30am.
|
|
|
|
|
Hi,
What will happen if exception is happening in finally black. for example
finally
{
//i am closing connection object here .
con.close() ;
//but connection is not opened means this will throw the exception . What will happen for this Exception
}
Thanks in advance
|
|
|
|
|
Should be the same as any other exception that is not handled, i.e. it breaks! why don't you try it?
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
You can write a piece of code to see what happends
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
In your case check if the connection state is open before closing it.
|
|
|
|
|
Specifically for your example, you could use a try /catch inside finally , thus:
try {
}
catch (Exception ex) {
}
finally {
try {
con.close();
}
catch (Exception ex) {
}
finally {
con = null;
}
}
Easy (and with tags too)
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
I'd recommend using a guard clause instead. I know you've answered the OP here, but it's better to do the following:
try
{
}
catch (...)
{
}
finally
{
if (conn.Open)
conn.Close();
}
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Probably better [he says after checking that is exactly what I have done] but I do have the closure in the finally block inside it's own try/catch.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Wouldn't
using (whateverConnection conn = new whateverConnection())
{
try
{
}
catch
{
}
}
be a better approach for the OP?
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.”
|
|
|
|
|
finally
{
if(con != null)
con.close() ;
}
modified 27-May-14 5:30am.
|
|
|
|
|
Hi.
I'm a total beginner in C# (and PC programming), but I'm starting to get the logic to work allright so I've got some hours in front of the computer. A couple of days ago I wanted to throw my own exception and I used the intellisense codesnippet to generate a new custom exception class. This works great and I have no problems using it, however I do not fully understand WHAT the lines of code actually do (how they work and what they are for). Since I got it working, I guess I really don't have to know what it does (since it is in fact working), however to expand my knowledge (and possible learn some tricks for the future) I would like to know what each line of the auto-generated code actually does, and what it is for.
Would anyone please do a quick explain of the code? I have pasted the auto-generated code here:
[global::System.Serializable]
public class IndexException : Exception
{
public IndexException() { }
public IndexException(string message) : base(message) { }
protected IndexException(
System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context)
: base(info, context) { }
}
|
|
|
|
|
Have a look here[^] and here[^]
only two letters away from being an asset
|
|
|
|