Search Results

Search found 3 results on 1 pages for 'blitzz'.

Page 1/1 | 1 

  • Editing a TreeView node doesn't change the TreeNode Key

    - by Blitzz
    I have a TreeView with user-editable nodes. I like to use the node caption as key to my tree node : + Root |+ Node1 ||- SubNode1 ||- SubNode2 |+ Node2 ||- SubNode3 ||- SubNode4 So I can reach a node like this: MyTreeView.Nodes["Root"].Nodes["Node2"].Nodes["SubNode3"] The problem is that, as I allow the user to rename any node, I would need also to change the key of my node in its parent in the AfterLabelEdit handler... which seems (logically) not to be done automatically. Unfortunately, Nodes["blabla"] is readonly, Nodes.Add(string Key, TreeNode Node) doesn't exist, and I can't find a way to do this without throwing (sooner or later) a bad exception. Any idea ?

    Read the article

  • default value for a static property

    - by Blitzz
    I like c#, but why can I do : public static bool Initialized { private set; get; } or this : public static bool Initialized = false; but not a mix of both in one line ? I just need to set access level to my variable (private set), and I need it set at false on startup. I wouldn't like to make that boring private _Initialized variable, which would be returned by the getter of the public Initialized var. I like my code to be beautiful. (NB: my variable is static, it can't be initialized in the constructor). Thanks

    Read the article

  • allocating "unmanaged" memory in c#

    - by Blitzz
    Hi, I'm writting a program in c# that uses a C++ library, and for some reason I need to allocate an unmanaged buffer to pass it to the lib. Is there a way to do this in c# ? Basically I would just need to do a malloc in C#... Thanks

    Read the article

1