|
Do not use the TextChanged event, LostFocus or Validating are better.
|
|
|
|
|
I think there are workarounds, but they have not thought out.
|
|
|
|
|
Thanks for your interest in my question the last few days, now I have done the above issue then.
|
|
|
|
|
Not sure what you want to do. Perhaps:
int amount;
if (int.TryParse(textBox1.Text, out amount))
{
textBox1.Text=amount.ToString("#,###");
}
|
|
|
|
|
Mightn't a NumericUpDown be what you want?
|
|
|
|
|
Have you no one has any solution to make stars?
|
|
|
|
|
This big forum who can solve the problem of your own?
|
|
|
|
|
Good evening, I want to test if the list of addresses in a gride view is valid or not,I want to insert a new colum I inserted an image or how could I do?
for(i=0;i<=j;i++)
{
adress(dgv1.SelectedCells[i].ToString());
if (vadrs.validate(adress))
{
!!!
}
else
{
!!!
}
{</pre></pre>
|
|
|
|
|
First, why does everyone treat the datagrid as if it's Excel??
Wouldn't you just bind the datagrid to a collection of address objects? Wouldn't one of the properties of a address object (for whatever type of address you're talking about) be IsValid and return a True/False value?
Then it should just be a simple matter of using a TemplateField on this "column" and returning the URL for either a good address or another for a bad address.
No, I don't have examples as I don't really do any ASP.NET stuff.
|
|
|
|
|
The bigger problem is the original thread is also a breed of 'code solicitation', which is not normally supported in these forums.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
|
I would choose IsEmpty because IMHO it implies a predicate that checks for emptiness, while Empty implies either a method to empty the polygon or a singleton instance of an empty polygon.
/ravi
|
|
|
|
|
|
Hmmmm... from the existentialism point of view, isn't a polygon with no points null??
Seriously, IsEmpty could also be used to describe the polygon as an enclosure. So, IsEmpty could actually refer to the polygon enclosing some content.
And is a polygon with only one or two points really a polgyon? Wouldn't the property then become IsValidPolygon?
Just some food for thought...
|
|
|
|
|
.NET isn't entirely consistent on the matter. Have a look at all the boolean properties of a System.Windows.Forms.Form, including:
1. Visible
2. IsAccessible, IsDisposed, IsMdiChild, ...
3. AllowDrop, CanFocus, CanRaiseEvents, CanSelect, ...
4. AutoScroll, AutoSize, ...
5. Created, Enabled, ...
Except for #1, they all have a verb (or even two), and that is how I'd do it too. One should avoid confusion, especially when the word could be an adjective as well as a verb. So I would reserve Empty for an action (method or event), IsEmpty for a property.
|
|
|
|
|
We can take this thread over and discuss such issues.
On something I was writing last week I have a Parse method and decided to have a TryParse as well, but it occurred to me that there is no need to differentiate the method names -- having overloaded Parse methods won't cause any trouble. So I wonder why Microsoft decided to use a new name. I suspect it's simply a matter of marketing -- they can advertise and talk up the new TryParse methods more easily that way.
|
|
|
|
|
I guess it would be considered too confusing to have some Parse() methods that throw exceptions on failure, and others that just return false; I do recall a Microsoft recommendation NOT to have a parameter that controls whether failures would throw exceptions, for the same reason.
|
|
|
|
|
Luc Pattyn wrote: it would be considered too confusing
I disagree; the boolean return and the documentation make it clear.
|
|
|
|
|
bool.Parse() would always return a bool...
|
|
|
|
|
True, but then there's the out parameter.
|
|
|
|
|
Exists or IsExists?
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
Are you speaking to non-existing objects now? Do you really expect Exists to return false any time soon?
This reminds me of Thread.IsAlive
|
|
|
|
|
|
PURGE *.*;*
|
|
|
|
|
Alas. I moved in December and haven't even hooked my AlphaServers back up yet.
|
|
|
|