Click here to Skip to main content
15,918,668 members
Home / Discussions / C#
   

C#

 
GeneralRe: Animation for an Agent in C# Pin
Richard Andrew x6427-Nov-11 16:29
professionalRichard Andrew x6427-Nov-11 16:29 
GeneralRe: Animation for an Agent in C# Pin
macantony28-Nov-11 1:12
macantony28-Nov-11 1:12 
AnswerRe: Animation for an Agent in C# Pin
Eddy Vluggen28-Nov-11 8:30
professionalEddy Vluggen28-Nov-11 8:30 
QuestionWinForms: visual clipping of docked controls added at run-time to Panel with AutoScroll=true Pin
BillWoodruff27-Nov-11 2:47
professionalBillWoodruff27-Nov-11 2:47 
AnswerRe: WinForms: visual clipping of docked controls added at run-time to Panel with AutoScroll=true Pin
OriginalGriff27-Nov-11 3:16
mveOriginalGriff27-Nov-11 3:16 
GeneralRe: WinForms: visual clipping of docked controls added at run-time to Panel with AutoScroll=true Pin
BillWoodruff27-Nov-11 4:06
professionalBillWoodruff27-Nov-11 4:06 
GeneralRe: WinForms: visual clipping of docked controls added at run-time to Panel with AutoScroll=true Pin
OriginalGriff27-Nov-11 4:09
mveOriginalGriff27-Nov-11 4:09 
GeneralRe: WinForms: visual clipping of docked controls added at run-time to Panel with AutoScroll=true Pin
Luc Pattyn27-Nov-11 11:15
sitebuilderLuc Pattyn27-Nov-11 11:15 
GeneralRe: WinForms: visual clipping of docked controls added at run-time to Panel with AutoScroll=true Pin
OriginalGriff27-Nov-11 21:21
mveOriginalGriff27-Nov-11 21:21 
GeneralRe: WinForms: visual clipping of docked controls added at run-time to Panel with AutoScroll=true Pin
Luc Pattyn27-Nov-11 22:06
sitebuilderLuc Pattyn27-Nov-11 22:06 
Answerpartial solution found : Re: WinForms: visual clipping of docked controls added at run-time to Panel with AutoScroll=true Pin
BillWoodruff27-Nov-11 4:50
professionalBillWoodruff27-Nov-11 4:50 
QuestionAbout this 3D graph in C# Pin
derek091927-Nov-11 1:27
derek091927-Nov-11 1:27 
AnswerRe: About this 3D graph in C# Pin
RobCroll27-Nov-11 16:31
RobCroll27-Nov-11 16:31 
GeneralRe: About this 3D graph in C# Pin
derek091928-Nov-11 0:03
derek091928-Nov-11 0:03 
GeneralRe: About this 3D graph in C# Pin
Alan Balkany28-Nov-11 6:01
Alan Balkany28-Nov-11 6:01 
GeneralRe: About this 3D graph in C# Pin
derek091928-Nov-11 13:37
derek091928-Nov-11 13:37 
Questionconvert IEnumerable to Datatable Pin
jojoba201127-Nov-11 0:11
jojoba201127-Nov-11 0:11 
How can i convert the IEnumerable<string> to Datatable.
i have this method but it will be slow in large data.
<pre lang="c#">
public static DataTable AsDataTable<T>(this IEnumerable<T> enumerable)
{
    if (enumerable == null)
    {
        throw new ArgumentNullException("enumerable");
    }

    DataTable table = new DataTable();
    if (enumerable.Any())
    {
        IList<PropertyInfo> properties = typeof(T)
                                            .GetProperties()
                                            .Where(p => p.CanRead && (p.GetIndexParameters().Length == 0))
                                            .ToList();

        foreach (PropertyInfo property in properties)
        {
            table.Columns.Add(property.Name, property.PropertyType);
        }

        IList<MethodInfo> getters = properties.Select(p => p.GetGetMethod()).ToList();

        table.BeginLoadData();
        try
        {
            object[] values = new object[properties.Count];
            foreach (T item in enumerable)
            {
                for (int i = 0; i < getters.Count; i++)
                {
                    values[i] = getters[i].Invoke(item, BindingFlags.Default, null, null, CultureInfo.InvariantCulture);
                }

                table.Rows.Add(values);
            }
        }
        finally
        {
            table.EndLoadData();
        }
    }

    return table;
}

QuestionMatch Two List Box By Sorting ... Pin
nassimnastaran26-Nov-11 7:13
nassimnastaran26-Nov-11 7:13 
AnswerRe: Match Two List Box By Sorting ... Pin
Not Active26-Nov-11 8:05
mentorNot Active26-Nov-11 8:05 
AnswerRe: Match Two List Box By Sorting ... Pin
Luc Pattyn26-Nov-11 8:14
sitebuilderLuc Pattyn26-Nov-11 8:14 
GeneralRe: Match Two List Box By Sorting ... Pin
nassimnastaran26-Nov-11 8:42
nassimnastaran26-Nov-11 8:42 
AnswerRe: Match Two List Box By Sorting ... Pin
Luc Pattyn26-Nov-11 9:53
sitebuilderLuc Pattyn26-Nov-11 9:53 
GeneralRe: Match Two List Box By Sorting ... Pin
nassimnastaran26-Nov-11 10:22
nassimnastaran26-Nov-11 10:22 
GeneralRe: Match Two List Box By Sorting ... Pin
Luc Pattyn26-Nov-11 10:34
sitebuilderLuc Pattyn26-Nov-11 10:34 
GeneralRe: Match Two List Box By Sorting ... Pin
nassimnastaran26-Nov-11 10:43
nassimnastaran26-Nov-11 10:43 

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.