|
|
You have to rewrite the code. The code that's throwing these errors is using features of C# that were not around in 2005. In your examples, it's using a shortcut to setting properties after creating an instance of Control. You just have to break those lines inside the curly braces out into their own lines of code.
|
|
|
|
|
follow you fix solutions how not ? I'm secrets can you help me ?
|
|
|
|
|
Uhhh...Yoda just read that and went "What?"
If you're asking me to rewrite the code for you,that's not going to happen. I've got my own code to write and I've got a few hours work left before I can go to sleep tonight.
|
|
|
|
|
no need to rewrite the code, the original was this error No overload for 'splitter1_SplitterMoving' matches delegate 'System.Windows.Forms.SplitterCancelEventHandler' you fix this ?
|
|
|
|
|
No, I can't. You typed the code and I can't see it. The error is telling you that you've got the method header parameter list for "splitter1_SplitterMoving" wrong.
|
|
|
|
|
|
your link posted nearly identical to my questions, your example changes the mouse pointer while dragging splitBar, my questions changes the color tranparen for splitBar while dragging splitBar. Thank you send me the link for referenceing
|
|
|
|
|
You're welcome.
This space for rent
|
|
|
|
|
Hi,
I have currently migrated my application from 2.0 to 4.0. What i suggest is try to build your code from target framework 4.0 to 2.0, also setting up the cpu type as x86 for 32 bit platform.
Also, if there are some client side validation, you need to do settings in pages element attribute controlRenderingCompatibilityVersion=2.0 in web.config for the asp.net controls.
-Mayank Pant
|
|
|
|
|
Don't know why you're telling me this. I know how to convert code. If you meant to tell the OP how to do this, they won't get any notifications that you replied to another person.
This space for rent
|
|
|
|
|
Pete ! my bad.
I just replied to your thread. That was not my intentions.
Thank you for correcting me .
|
|
|
|
|
Hello friends ! Now, I do not Convert 2.0, I'm using 4.0, but still you see the error of my attachments SplitterPaint_[^]
|
|
|
|
|
Why not go and ask the person who wrote the article?
|
|
|
|
|
The error I got by simply pasting the code into a blank project was
Quote: Error 1 The name 'Color' does not exist in the current context That went away when I included
using System.Drawing;
In a subsequent comment you stated Quote: the original was this error No overload for 'splitter1_SplitterMoving' matches delegate 'System.Windows.Forms.SplitterCancelEventHandler' Nothing in the code you have posted nor in the link you provided produces that error - you will need to show us that code if you expect some help
|
|
|
|
|
I declare libraries needed then but not run. you see my attach file SplitterPaint_[^]
|
|
|
|
|
I don't download unsolicited files from unknown sources. You can post code here or use something like imgur to show an image.
|
|
|
|
|
I checked and normal download you can tell me why you can not download ?
|
|
|
|
|
Because I do not download rar or zip files from unknown sources. If I was at work then it would be prevented by the firewall rules in place, at home it is a personal decision. It's a policy that might explain why up to now I have not been affected by any viruses
|
|
|
|
|
To start, I'm a fan of the out keyword. I like being able to return a true/false to indicate that the function completed successfully and pass additional information or result sets through a function arguments. I've seen many times during code analysis that Visual Studio gripes about out parameters, CA1021 to be precise. I understand the point that the devs were making when they state that using out and ref requires an understanding of pointers but in that context, shouldn't they also try to discourage using delegates, since delegates are pointers to functions? Which are we supposed to believe? Personally, I see the out keyword as better choice in some task specific uses and that writing a custom result class rarely has any measurable benefit.
I would like to hear what the experts think of this. Is out okay or should its use be avoided?
if (Object.DividedByZero == true) { Universe.Implode(); }
Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016
|
|
|
|
|
Instead of an out Boolean to indicate success/failure, throwing exceptions provides more flexibility and scalability
|
|
|
|
|
Sorry I didn't clarify in the question, but I didn't indicate that exception handling was implied. There are cases where success doesn't mean that the function ran without error and that using out could make the function more useful.
Example
public bool IsProductOnSale(guid productId, out Guid[] productResellerIds)
{
}
It's not the best example without a better understanding of the overall context. I'm just saying, if you have what you need already, why write multiple functions for what could be handled in one?
if (Object.DividedByZero == true) { Universe.Implode(); }
Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016
|
|
|
|
|
Why not returning the array instead and interpreting an array-length of 0 as "product is not on sale"?
(The method should be renamed then of course.)
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
I thought it was a bad example. I'm just trying to start a discussion on the use of out and not focus too much on implementation specific code.
if (Object.DividedByZero == true) { Universe.Implode(); }
Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016
|
|
|
|
|
clapclap wrote: Instead of an out Boolean to indicate success/failure, throwing exceptions provides more flexibility and scalability
This is a very bad practice. Exceptions are just that, when something exceptional happens. Exceptions are very expensive operations, they take a long time to create, have you seen all the information that is involved when an exception occurs? Using exceptions to control things you expect to happen, or can predict will happen, is very bad practice.
|
|
|
|