Jump to content
Xtreme .Net Talk

IngisKahn

Avatar/Signature
  • Posts

    436
  • Joined

  • Last visited

Everything posted by IngisKahn

  1. That feature is already built into .NET Look up Strong Names.
  2. That looks like it belongs on thedailywtf.com :)
  3. A bit more compact: (\d)(?:\1){2}
  4. Generally, when entering unknown territory, prototyping is a good course to take. Any time "lost" doing a rewrite will be more than made up for supporting your organized code as opposed to your initial spaghetti.
  5. What you're looking for is a set. PowerCollections should solve your problems. :) http://www.wintellect.com/powercollections/
  6. A button is just a class like anything else; you can create and destroy them at your liesure. :)
  7. , the comma in question (?! look ahead negative i.e. make sure this doesn't follow (?: don't save this .*, any number of charcters follwed by a comma ))
  8. marble brings up anonymous types which is whole different story (and the one 3.0 feature that I feel a bit uneasy about). And bri, come on! You wrote it yourself: implicit typing is for local variables only. How could a type safe language call a function on a variable without a type? And restricting names to 12 characters??? Good luck, especially with generic types.
  9. That will give you ", Brown" I'd go with: ,(?!(?:.*,))
  10. Wait.... How could this ever be used inappropriately?
  11. So why wouldn't you? ;) I'd say there's no excuse not to use a VS grade IDE or equivalent these days.
  12. He never said a point in what dimension. Now we all know that you're 2D prejudiced. :p
  13. Heh, a bit overkill no? If you were to count every atom in the universe you'd only need 80 digits.
  14. 36^35 is 55 digits (2.955e54). :) All you're concerned about is the string? If so, then why use large numbers at all?
  15. Wow, that is a big large number. Just wondering what you need 55 digits for. And ya, you'd probably be best off with a structure consisting of a couple Decimals.
  16. Yes.......
  17. The Express version disables it by default. You can turn it on under Tools->Options
  18. You'll need some heavy assembly code to hook into DX or OGL calls.
  19. BTW: Factors are used in multiplication, addends are used in addition. :)
  20. List<int> FindCrazyNumbers(int solution) { if (solution < 1 || solution > 45) return null; List<int> ret = new List<int>(); int sum = 0, add = 10; while (sum != solution) if (sum + --add <= solution) { sum += add; ret.Add(add); } return ret; }
  21. Ya, that was the polite way of asking. :)
  22. Er, how do you pass a file?
  23. It's not as dire as you paint it. :) All "var" does is cut down on clutter really. e.g. MyVeryLongGenericTypeName<MyVeryLongClassName> foo = new MyVeryLongGenericTypeName<MyVeryLongClassName>(...);becomes var foo = new MyVeryLongGenericTypeName<MyVeryLongClassName>(...); The type of the variable is determined by the initializer and cannot be changed (yes, it would be a compile-time error). Just like any other variable, if you hover your mouse over it you'll see it's type.
  24. It's all about ease of use. If your delegate is only one or two statements then it's the way to go. Plus the ability to incorporate local variables makes it handy. One instance where I've used them is in a tranformation matrix control. You can translate, scale, and rotate the matrix in any order, so I just create an anonymous delegate for each step.
  25. In most cases classes are sealed because the designer didn't think it was worth considering which functions to make virtual. Extension methods should be used vary sparingly, in fact the C# 3.0 documentation stresses this. With that said, I find it very useful for utility functions, especially those dealing with structures since they can be derived from anyway. I�ve already made good use of them with DirectX�s Vector3 and Matrix structures.
×
×
  • Create New...