Click here to Skip to main content
15,885,216 members
Home / Discussions / C#
   

C#

 
QuestionClipping Line in WPF Pin
nhuvayday4-Jan-12 17:30
nhuvayday4-Jan-12 17:30 
QuestionCan you run application (built in C#) from PC to Mobile phone via Bluetooth Pin
LAPEC4-Jan-12 13:28
LAPEC4-Jan-12 13:28 
AnswerRe: Can you run application (built in C#) from PC to Mobile phone via Bluetooth Pin
Dave Kreskowiak4-Jan-12 15:21
mveDave Kreskowiak4-Jan-12 15:21 
GeneralSeeking a C# mentor. Pin
Member 85400644-Jan-12 12:36
Member 85400644-Jan-12 12:36 
GeneralRe: Seeking a C# mentor. Pin
Richard Andrew x644-Jan-12 13:17
professionalRichard Andrew x644-Jan-12 13:17 
GeneralRe: Seeking a C# mentor. Pin
Member 85400644-Jan-12 13:40
Member 85400644-Jan-12 13:40 
GeneralRe: Seeking a C# mentor. Pin
fjdiewornncalwe5-Jan-12 4:40
professionalfjdiewornncalwe5-Jan-12 4:40 
QuestionFeedback on this Tree class design? Pin
SledgeHammer014-Jan-12 11:06
SledgeHammer014-Jan-12 11:06 
For some reason got on a Tree class kick (tree, btree, bstree, avltree, etc). So I started porting an old MFC version I wrote 10yrs ago and decided instead to redesign it.

Concept I'm going for at this point is I'll have a base Node object, a NodeCollection and a Tree class. The btree will derive from tree, the bstree will derive from btree and the avl tree will derive from bstree.

Right now... everything looks something like:

C#
public class Node<T>
{
        public Node(T value)
        {
            _value = value;
        }

        public NodeCollection Children
        {
            get
            {
                return _children;
            }
        }
}

public class NodeCollection : Collection<T>
{
}

public class Tree
{
        public Node Root
        {
            get
            {
                return _root;
            }

            set
            {
                _root = value;
            }
        }
}


Obviously, I snipped out the non important stuff for brevity, but one thing I'm not liking so far is that is that you need to do something like tree.Root.Value, tree.Root.Children[4].Value, etc to get to the real value. I.e. everything works on a Node object instead of the value object. I guess you do need a Node object so you can have somewhere to get the children from. Perhaps if I add some methods to NodeCollection to find Nodes by Value it will make it better?

Any suggestions, I'm not liking something about this design, but I'm not quite sure what it is.

My C++ version sort of hid all that by using the Windows POSITION thingy... which I guess is pretty much the same this as just returning a Node... Hmmm...
AnswerRe: Feedback on this Tree class design? Pin
Pete O'Hanlon5-Jan-12 2:37
mvePete O'Hanlon5-Jan-12 2:37 
GeneralRe: Feedback on this Tree class design? Pin
SledgeHammer015-Jan-12 6:45
SledgeHammer015-Jan-12 6:45 
GeneralRe: Feedback on this Tree class design? Pin
SledgeHammer015-Jan-12 10:11
SledgeHammer015-Jan-12 10:11 
AnswerRe: Feedback on this Tree class design? Pin
BillWoodruff5-Jan-12 17:28
professionalBillWoodruff5-Jan-12 17:28 
AnswerRe: Feedback on this Tree class design? Pin
RobCroll6-Jan-12 1:40
RobCroll6-Jan-12 1:40 
GeneralRe: Feedback on this Tree class design? Pin
BillWoodruff7-Jan-12 23:52
professionalBillWoodruff7-Jan-12 23:52 
QuestionNAudio Pin
Member 20880664-Jan-12 9:11
Member 20880664-Jan-12 9:11 
AnswerRe: NAudio Pin
RobCroll6-Jan-12 1:58
RobCroll6-Jan-12 1:58 
Questionhelp with code for convert from csv to excell Pin
goldsoft4-Jan-12 1:59
goldsoft4-Jan-12 1:59 
AnswerRe: help with code for convert from csv to excell Pin
Dave Kreskowiak4-Jan-12 3:22
mveDave Kreskowiak4-Jan-12 3:22 
GeneralRe: help with code for convert from csv to excell Pin
goldsoft4-Jan-12 4:09
goldsoft4-Jan-12 4:09 
GeneralRe: help with code for convert from csv to excell PinPopular
Dave Kreskowiak4-Jan-12 4:42
mveDave Kreskowiak4-Jan-12 4:42 
GeneralRe: help with code for convert from csv to excell Pin
jschell4-Jan-12 8:19
jschell4-Jan-12 8:19 
GeneralRe: help with code for convert from csv to excell Pin
Dave Kreskowiak4-Jan-12 9:17
mveDave Kreskowiak4-Jan-12 9:17 
GeneralRe: help with code for convert from csv to excell Pin
jschell6-Jan-12 8:36
jschell6-Jan-12 8:36 
GeneralRe: help with code for convert from csv to excell Pin
fjdiewornncalwe4-Jan-12 9:19
professionalfjdiewornncalwe4-Jan-12 9:19 
GeneralRe: help with code for convert from csv to excell Pin
jschell6-Jan-12 8:37
jschell6-Jan-12 8:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.