Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

127 Neutral

About Niksan

  • Rank
  1. RDragon1 has the better solution imo, the problems with foreach is iirc the same problem if you cycle using ::iterator in c++, you break the chain and it can cause all sorts of problems, you'd get the same problem if you used forward indexing as well because once you start deleting I'd expect you'd get an out of bounds exception, you could do it by doing reverse indexing, but I guess that's why removeall exists. EDIT: I used to do it like benryves does, but know I realize what RemoveAll does, that's what I'll be using from now on :)
  2. http://www.lvr.com/hidpage.htm might give you a starting point also, but as daviangel said, it's not something I'd like to havea go at either :)
  3. Niksan

    [.net] [C#] ArrayList/List?

    Generics avoid the need for boxing/unboxing, which costs, so unless you're using a collection of different types in the same list there's no need to not use generics, however, I'm not certain how derived objects are handled, whether they're boxed or not, so if you have a collection based on a shared base class whether this has as much penalty as just using a none generic collection I don't know.
  4. Guys where I work used SWIG to do the same thing, took them half a day to get it all running so the c++ side was exposed etc, so you might want to check it out to see if it suites your needs.
  5. Quote:Original post by bluntman Thanks for the help. Dorvo, I tried the readonly keyword and it makes no difference, I am still allowed to assign to F.F.S! You're talking about readonly on F rather than S within the SubFool class, which I assume Dorvo was talking about. EDIT: If you're using value type matrix it shouldn't matter as you'd essentially be returning a copy. [Edited by - Niksan on November 28, 2006 5:55:52 AM]
  6. As already mentioned you can mark the element within SubFool as readonly, a lot of the winforms rectangles and the like do the same thing so if you want to change any component you have to assign a new rectangle each time, however, IIRC using the readonly flag means you can only set the variable in the constructor, so it probably depends on the implimentation, whether a constant would suffice instead. Basically your code is doing the following. F.F.S = 10 is valid because it's only reading the F class you marked read only. If you try F.F = new SubFool it won't compile, because it's readonly.
  7. There's two dll's/set of source files from microsoft that you can use to basically write your own deployment stuff, with the old manifests and what not, I can't think of the name of them off hand and unless someone beats me to it I'll post them later when I get home. Edit: http://www.microsoft.com/downloads/details.aspx?familyid=C6C09314-E222-4AF2-9395-1E0BD7060786&displaylang=en [Edited by - Niksan on November 23, 2006 12:18:24 PM]
  8. Then call ListBox->Sorted = true; when needed. EDIT: actually, what you were initially doing should be ok according to http://msdn2.microsoft.com/en-us/library/system.windows.forms.listbox.sort(VS.80).aspx but i'd think you have to set the sort property to false.. as essentially you're performing two sorts.
  9. Listbox uses its own sort function, your array list will be fine, but the listbox has it's own sort mechanism, derive from ListBox and override sort to do what you want.
  10. If you're using a FileStream object, you can check the CanWrite property, this will be set to false when the file is closed.
  11. if you change your random range to 32,255 that way you won't be trying to print control characters, of which BEEP is sub 32 iirc.
  12. Niksan

    [.net] "rubber band" etc as control?

    You could try drawing none straight lines by using paths, and you could also try to only dirty the rectangle you know needs updating graphics wise, rather than invalidating the whole client area, if you're suffering from a draw performance hit.
  13. Doesn't console writeline flush itself after the call ? and you're doing it for every pixel, that's a lot text flushing which isn't that quick anyway, you only need to see how slow the debug prints are when you're using directx and that churns out debug text..
  14. Niksan

    GDI BitBlt Vs StretchBlt

    Noted, I'm just using it as a lazy way to create some thumbnails for images, thanks for the tip though.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!