Search results

  1. S

    Hello I’m new to this forum

    I think you may be talking to a robot. The profile is a bit of a giveaway... We've been getting alot of these lately. Funny thing is that they aren't posting spam. I'll never understand the mind of a robot.
  2. S

    Express Versions Registration Issue

    I had an issue (now resolved), and I'm just curious to see if anyone else has had the same issue. I've been using C# Express for quite a long time now (you just can't argue with the price), but a few weeks ago my installation suddenly wasn't registered, which was quite peculiar since I...
  3. S

    Looping Construct - Thoughts?

    Just hoping to get some input for a DotNet project I'm working on, and figured that C# programmers would be the best to ask. If a simplified looping structure were introduced to C# (using the hypothetical "loop" keyword) I would like to hear thoughts on a few points. This hypothetical loop...
  4. S

    Too Many Windows

    I've brought it up in the past, but I feel compelled to make an issue of it again. Windows Forms is sorely lacking what is known in the VB6 world as "light-weight controls," or, controls that don't own their own window, and instead share their parent's window. The reason that I bring this up is...
  5. S

    Instance Methods on Null References

    This is just a thought I had. I don't expect, or even really hope, that it should happen. Just sharing some thoughts, I suppose. A somewhat novel idea occurred to me. At runtime, the only thing that actually stops the CLR from invoking an instance method on a null reference is a runtime check...
  6. S

    Immutable ValueTypes

    According to MSDN, Note the item highlighted in red. My question is, why should a struct be immutable? There are cases where it would make sense, but why should this be a general rule? It doesn't seem appropriate in so many cases. Look at the DotNet classes such as Rectangle and Point. Why does...
  7. S

    Trusted Computing

    In a recent thread about Windows Vista I went on a small rant about the Trusted Computing component of this new version of Windows. Now aware of how little attention the Trusted Computing (TC) concept has received in the general public (largely in part of how major software developers downplay...
  8. S

    Parameter Marshalling with Heap and Stack Objects

    I've seen certain questions asked a number of times and decided that it would be appropriate to have some reference that clearly explains the details of this tricky aspect of function calls. To get the most out of this you should understand the concept of pointers and the difference between...
  9. S

    Garbage Collection And IDisposable

    This is just an overview of what a good DotNet programmer should know about garbage collection and disposable objects, prompted by this post. Garbage Collection There are plenty of thorough articles about garbage collection, so I will only quickly cover the basics. All class objects, or...
  10. S

    Interpolated Picture Box

    Ever wish the picture box could scale images without using bilinear filtering (for example, when viewing/editing video game graphics)? In the past I had written controls from scratch that emulate the PictureBox but used my desired interpolation. Then I was hit with a stroke of common sense. I've...
  11. S

    DirectX Textures for Tile-Based Games

    I'm really into old school video gaming (i.e. NES/SNES/Genesis). I'm getting into DirectX, using Direct3D to make 2D games. Given a bitmap that contains a number of tile images (i.e. a tile sheet, aka sprite sheet), does anyone have any tips for loading up the bitmap and chopping it into...
  12. S

    Private Member Reflection

    I was working with my Reflector class when I ran into a little problem, and after a couple of hours of debugging and toying around and researching I can't seem to make any progress. What I am trying to do is access a private field (dialogResult) on an instance of a class that derives from...
  13. S

    Reflector Class - Reflection Made Easy

    Anyone who has spent more than a little bit of time getting their hands dirty with reflection will be well aware that all kinds of magic can happen through the System.Type.InvokeMember method. Unfortunately, though, this function has a large number of parameters to cover nearly every member...
  14. S

    Global Caching

    I posted this class definition on another thread and decided that it would be a good idea to post it in the Code Library as well. It is a generic, global object caching class, working in a dictionary-like manner (and, in fact, backed by a Dictionary<string, TValue> object). Because of the way...
  15. S

    C# Unions

    C++ offers a special kind of type that is not present in C#: a union. For anyone who is not familiar with unions, here is a quick explanation of how they work and what they're good for. How They Work A union is somewhat like a struct. A union definition defines a type. A union type has fields...
  16. S

    Design Mode Detection

    The DesignMode property of the Control class is meant to be testable to see if the control is in design mode, allowing the programmer to produce different behavior at design time than at runtime. Unfortunately, the behavior of this property is particularly unreliable. It certainly has...
  17. S

    Collection Editor Not Deleting Old Components

    After much effort and time, I've gotten the collection editor to properly work with a collection property (Items) on a control I've written. The only problem I am having now is that when I delete the control in the designer, the components that were assigned to the Items property are not being...
  18. S

    DebuggerDisplay Doesn't Work

    I can't get the DebuggerDisplay attribute to work in C# express. It works just fine in VB. I searched google and it seems like I'm the only person who has this problem. I can't find any relevant settings or anything. Module Module1 Sub Main() Dim var As New X 'Displays "Test" in...
  19. S

    Teleporting Consiousness

    I hope no one minds a post that has nothing to do with programming. My brother and I are in disagreement as to whether teleportation of a person (metaphysical issues and variables aside) would result in a new, different consciousness (essentially killing the original person) or the same...
  20. S

    TileBox Control - Tile Based Rendering Control

    I whipped this up for a small concept game, and decided to polish it up and post it here. It is ideal for simple tile based games. Possible Improvements: More rendering methods (i.e. draw group of tiles, clear control to default tile) More rendering overloads Support for multiple sources...
Top Bottom