Notice to all users

We are migrating towards a new forum system located at, as such this forum will become read-only on January 29, 2020

Results 1 to 2 of 2
  1. #1
    Join Date
    December 2016

    Question C# Help me making ChannelTreeView

    List<ChannelTreeItem> result = new List<ChannelTreeItem>();
    result = QueryUtils.GetChannelTree(TopQuery.GetChannelList().Values,TopQuery.GetClientList().Values);
    but, i has error
    Cannot Convert System.Collections.Generic.List<TS3QueryLib.Core.Common.ChannelTreeItem>' to 'string'

  2. #2
    Join Date
    October 2014
    result is of type List<ChannelTreeItem>.
    You're trying to add it to treeview1.Nodes which accepts a string
    this is a conflict of types. I've never worked with C#, but what you probably are looking for is a 'for' loop with result.get(index) which would return a ChannelTreeItem that you then get a string from? (channelName perhaps?)
    e.g. (pseudocode)
    for (int i = 0; i < result.size(); i++){
    treeView1.Nodes.add(result.get(i).Channel.ChannelN ame);

    If treeview is a TreeNodeCollection then you probably want to just get an item from result and insert that (but it wouldn't ask for a string then)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. TS making me lag a lot
    By Bobedrob in forum Windows
    Replies: 6
    Last Post: July 8th, 2012, 01:47 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts