|
Gilbert Consellado wrote: Is there way enumerating all edited items? Depends on how you track what has been edited. From your base-class, I'd expect that flag to be set in the setter of the affected properties of all derived classes. It won't be set automatically.
INotifyPropertyChanged isn't "slow", but it'd be a bit overkill if you're using it merely to track which record has changed.
Alternatively, you can override Object.GetHashCode[^] and present a hash of the combined properties. That'd make comparing easy
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: Depends on how you track what has been edited. From your base-class, I'd expect that flag to be set in the setter of the affected properties of all derived classes. It won't be set automatically.
I am sorry, but how i should do that.
Eddy Vluggen wrote: Alternatively, you can override Object.GetHashCode[^] and present a hash of the combined properties. That'd make comparing easy
I was thinking if i have huge amount of data, then comparing each of them, could that be potential for performance issue.
|
|
|
|
|
Tell me the answer for this one.
|
|
|
|
|
|
That's not really an answer as apparently SO can't agree!
Personally I'd say that it is almost 100% OO, everything in C# is an object, even primitive types ... except methods and classes, which can easily be manipulated into object types (Delegate and Type respectively), but which are not actually objects in and of themselves.
|
|
|
|
|
Yes.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
Well, I think that all depends on how you define what an OO Language is. If you met someone at Xerox Parc in the 1970's who programmed in SmallTalk, and showed them the C# Language specification, they might say C# is not a full OO Language because it doesn't support "true" multiple-inheritance, and it distinguishes value Types from reference Types. But, that same person would probably also say that Java, Ruby, and Python, are not OO Languages.
But, if you ask the question as: "Is C# an object-oriented language ?:" then, I would say: "yes," because you can't do squat in C# without creating and using objects; and, yes, because C# supports the key-features of object-oriented languages, including classes, and inheritance.
“The best hope is that one of these days the Ground will get disgusted enough just to walk away ~ leaving people with nothing more to stand ON than what they have so bloody well stood FOR up to now.” Kenneth Patchen, Poet
|
|
|
|
|
What exactly do you mean by "fully object oriented"? That doesn't seem to be a well-defined term.
|
|
|
|
|
Please can you define what you mean by well-defined term .
Everyone dies - but not everyone lives
|
|
|
|
|
Oh you
|
|
|
|
|
See recursion.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
|
Not fully recoursive.
This is.
Ciao,
luker
|
|
|
|
|
Ok - you win!
Everyone dies - but not everyone lives
|
|
|
|
|
|
As Bill points out, just how OO is it? Does the fact that it allows static methods and objects adhere to OO tenets?
|
|
|
|
|
You have several excellent answers here, but I will throw a one into the mix - is a language that supports static methods and objects fully object oriented? Does that fit into a classical definition of OO?
|
|
|
|
|
Below is the two hyperlinks, when i click one of them the following events must take place:
-set a focus to the active link
-change the background color of the clicked link
I tried to use CSS and JScript but it does not work.
please anyone with the solution there ...HELP
Home About Us
|
|
|
|
|
And what does this have to do with C#?
|
|
|
|
|
It can be done with CSS or JavaScript. Ask a new question in the respective forum, showing us what you tried (i.e. your code) and what it caused. Then we could find out what you did wrong, and show you the solution.
|
|
|
|
|
Hi All,
I have a windows application (Form1) in form one I have 150 Label
and I want to remove this labels using
foreach(Label lbl in this.Controls)
this.controls.remove(lbl);
I need to stop refresh the form, also I use suspendLayout() before removing and resumeLayout after removing but it is still refreshing.
Please help me how to stop the form refresh until remove all controls.
Thank you very much
|
|
|
|
|
zead wrote: I use suspendLayout() before removing and resumeLayout after removing but it is still refreshing. The Form should not be updating if you have used 'SuspendLayout properly.
Are you executing 'SuspendLayout outside the loop in which the Labels are being removed ?
Please describe in detail exactly how the Form appears to be updating: what do you see ? Are all the Labels on the Form; or, are some of the Labels inside some Container Control, like a Panel ?
“The best hope is that one of these days the Ground will get disgusted enough just to walk away ~ leaving people with nothing more to stand ON than what they have so bloody well stood FOR up to now.” Kenneth Patchen, Poet
|
|
|
|
|
Hi,
This is the code:
private Void RemoveLabels()
{
SuspendLayout();
try
{
for(int i=0;i
|
|
|
|
|
That is a lot of labels to remove from a form.
Can you describe the refreshing issue that you are having?
one thing to try is to enable the double buffering on the form[^].
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
Hi,
I mean by refresh you can see the form redraw the controls and you can see the Labels when it is removed, I want the label to still shown until last label deleted and empty the form.
Thanks
|
|
|
|