Jump to content
Xtreme .Net Talk

IngisKahn

Avatar/Signature
  • Posts

    436
  • Joined

  • Last visited

Everything posted by IngisKahn

  1. That shouldn't even compile. Your if statement is invalid. ( == )
  2. Declaring a private constructor would ensure that you can not create any additional Printer objects. You can still declare a variable of the type Printer but the only way to use it is to set it to the object returned by the static Printer.Instance property. You can use this method to have easy access to Printer's members. Your other option would be to use a static class.
  3. public class Printer { static Printer instance = new Printer(); Printer() { ... } public static Printer Instance { get { return instance; } } } The keys are a private constructor and a static property. In .NET 2.0 you could also use a static class. BTW: MS also recommends not using underscores. :p
  4. Nesting namespaces would also be an option.
  5. An enum is just a list of consts, why would you need to nest them?
  6. System.Security.Cryptography.CryptoStream should do what you need.
  7. Don't forget that .NET 2.0 has int.TryParse(...)
  8. Convert.ToDouble(...) :)
  9. As for temp variables, local value types exist on the stack -- no garbage collection involved.
  10. /me loves System.Net.FtpWebRequest :)
  11. I prefer $1~000^00 :p
  12. That will only help if you have multi disks.
  13. Ya, duh, match the buffer size.
  14. Uh, VB6 came out long after the death of 16 bit and handles 32-bit operations just fine, but ya, the variable sizes have changed.
  15. Writing one byte at a time will be painfully slow. Try writing in larger blocks, 1024 is a good size -- on average that block size yields the best speed vs number of updates.
  16. But 11 is incorrect. It takes up 22+ bytes in memory and 22 bytes in a file unless you convert it to ascii first.
  17. You can't just make up function names and hope the class supports it. Intellisense and Object Browser are your friends. Rightly so, RichTextBox has nothing to do with deleting files. Look in the System.IO namespace, you'll see the File class that has a Delete(string path) static function.
  18. Just to extol the virtues of .NET 2.0: .TryParse() :)
  19. Surround the path in quotes.
  20. Also the Autos window is your friend.
  21. Jeez, lighten up. :) = happy/fun/good/nice Have you read my post? You have a function call causing side effects in the watch window. (BTW, VS 2005 won't evaluate functions with side effects in the debug windows.) Debug->Windows lets you display all the debug windows.
  22. lol :) Look at your watch window.
  23. mskeel hits the nail on the head.
  24. Besides, VS2003 and VS2005 can exist side-by-side with no problems.
  25. Just a quick scan of your code -- I see that you're not clearing the ZBuffer. device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, System.Drawing.Color.White, 1.0f, 0);
×
×
  • Create New...