Click here to Skip to main content
12,625,912 members (27,046 online)

Comments by Henrik Jonsson (Top 7 by date)

Henrik Jonsson 20-Oct-16 15:18pm View
   
Check the stack trace to see whether you end up in a call to remove or add while you are iterating from the same thread.
Henrik Jonsson 27-Aug-16 8:09am View
   
You should state what type of error (Exception) you get, to let us help you better.

Please observe that there is a 2G size limit of any .NET object, even on 64-bit systems. See http://stackoverflow.com/questions/1087982/single-objects-still-limited-to-2-gb-in-size-in-clr-4-0?noredirect=1&lq=1
Henrik Jonsson 24-Jun-16 3:21am View
   
I think you must explain a little bit more and show where you have put the above code. Only if you put it in the SelectedValueChanged event handler it might work. However, your conversion to String and then to Int64 seems very strange.
Henrik Jonsson 2-Apr-16 16:05pm View
   
Hi,
you indicate above that you have tried with a manifest. However, are you sure that you have an "app.manifest" file with the following line: <requestedexecutionlevel level="requireAdministrator" uiaccess="false">
and that file is specified as the Manifest file in VS Project properties. If this is the case you should get a prompt for evaluated access whenever you start the program and then not get any UnauthorizedAccessException exception when you try to copy to a folder under c:\Program files\. I just tried that.

Please try that and good luck.
Henrik Jonsson 14-Mar-16 16:17pm View
   
Next time, why not trying googling for "difference between BlockingCollection and ConcurrentBag" first. For me this led to the following Code Project Article that explain some usage scenarios: http://www.codeproject.com/Articles/181410/Thread-safe-Collections-in-NET
Henrik Jonsson 24-Aug-15 14:20pm View
   
I think you have to clarify which game engine you are using.

I suspect that after you have stopped the timer, the invocation of your code (script) above will also be stopped. Therefore, the "else" case will never be reached. You may have to implement cancellation by setting som state variable instead which must be considered before moving any game object.
Henrik Jonsson 24-Aug-15 14:13pm View
   
Do you really mean mean "overloading", as in having the same method name but with different parameters, and not "overriding", meaning that a derived class creates a new version of the method with the same parameters. For the latter, overriding, you can use the "sealed" keyword. For the former, overloading, it is not possible without using a static code analyzer (written using Roslyn for instance), or a tool that uses reflection on the compiled assembly to look for methods with same names but different signature (parameters).

Try to explain what you want to prevent, and reason for it. Then maybe someone can help you better.

Advertise | Privacy | Mobile
Web02 | 2.8.161205.3 | Last Updated 1 Jan 1900
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid