Click here to Skip to main content
15,881,787 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to dynamically load assembly and dependencies from file path. Pin
Eddy Vluggen8-Sep-20 7:41
professionalEddy Vluggen8-Sep-20 7:41 
GeneralRe: How to dynamically load assembly and dependencies from file path. Pin
koirat8-Sep-20 9:59
koirat8-Sep-20 9:59 
GeneralRe: How to dynamically load assembly and dependencies from file path. Pin
Eddy Vluggen8-Sep-20 10:04
professionalEddy Vluggen8-Sep-20 10:04 
GeneralRe: How to dynamically load assembly and dependencies from file path. Pin
koirat8-Sep-20 12:25
koirat8-Sep-20 12:25 
QuestionCreate a Multi-Layer Data Model from a MySQL Query Pin
mjeeves7-Sep-20 8:25
mjeeves7-Sep-20 8:25 
AnswerRe: Create a Multi-Layer Data Model from a MySQL Query Pin
mjeeves7-Sep-20 8:43
mjeeves7-Sep-20 8:43 
GeneralRe: Create a Multi-Layer Data Model from a MySQL Query Pin
Richard MacCutchan7-Sep-20 9:27
mveRichard MacCutchan7-Sep-20 9:27 
GeneralRe: Create a Multi-Layer Data Model from a MySQL Query Pin
mjeeves7-Sep-20 9:44
mjeeves7-Sep-20 9:44 
here is another example data set, i want to go one more level down and group by username and EventTime, but i don't know how to expand the linq, plus i will have to remove the time stamp from the event dattime

C#
<pre>namespace ConsoleApp3
{
    class Program
    {
        static void Main(string[] args)
        {
            List<SignInReport> SignInReports = new List<SignInReport>();
            SignInReports.Add(new SignInReport { UserName = "Bob", EventName = "SignIn", EventTime = new DateTime(2020,1,18,6,0,0) });
            SignInReports.Add(new SignInReport { UserName = "Bob", EventName = "SignOut", EventTime = new DateTime(2020, 1, 18, 10, 0, 0) });
            SignInReports.Add(new SignInReport { UserName = "Bob", EventName = "SignIn", EventTime = new DateTime(2020, 1, 18, 11, 30, 0) });
            SignInReports.Add(new SignInReport { UserName = "Bob", EventName = "SignOut", EventTime = new DateTime(2020, 1, 18, 16, 30, 0) });
            SignInReports.Add(new SignInReport { UserName = "Charlie", EventName = "SignIn", EventTime = new DateTime(2020, 1, 18, 6, 0, 0) });
            SignInReports.Add(new SignInReport { UserName = "Charlie", EventName = "SignOut", EventTime = new DateTime(2020, 1, 18, 15, 30, 0) });
            SignInReports.Add(new SignInReport { UserName = "Charlie", EventName = "SignIn", EventTime = new DateTime(2020, 1, 19, 6, 30, 0) });
            SignInReports.Add(new SignInReport { UserName = "Charlie", EventName = "SignOut", EventTime = new DateTime(2020, 1, 19, 17, 45, 0) });

            IEnumerable<SignInReportGrouping> SignInData = SignInReports.GroupBy(u => u.UserName)
                                                  .Select(group => new SignInReportGrouping {   UserName = group.Key, 
                                                                                                SignInReports = group.ToList() })
                                                  .ToList();
        }
    }

    public class SignInReport
    {
        public string UserName { get; set; }
        public string EventName { get; set; }
        public DateTime EventTime { get; set; }
    }

    public class SignInReportGrouping
    {
        public string UserName { get; set; }
        public IEnumerable<SignInReportDay> SignInReportDay { get; set; }
    }

    public class SignInReportDay
    {
        public IEnumerable<SignInReport> SignInReports { get; set; }
    }
}

GeneralRe: Create a Multi-Layer Data Model from a MySQL Query Pin
Richard Deeming7-Sep-20 22:34
mveRichard Deeming7-Sep-20 22:34 
QuestionProblem showing a symbol from a custom font Pin
Mc_Topaz6-Sep-20 21:18
Mc_Topaz6-Sep-20 21:18 
AnswerRe: Problem showing a symbol from a custom font Pin
Richard Deeming6-Sep-20 23:04
mveRichard Deeming6-Sep-20 23:04 
AnswerRe: Problem showing a symbol from a custom font Pin
Mc_Topaz6-Sep-20 23:54
Mc_Topaz6-Sep-20 23:54 
GeneralRe: Problem showing a symbol from a custom font Pin
Gerry Schmitz7-Sep-20 7:37
mveGerry Schmitz7-Sep-20 7:37 
GeneralRe: Problem showing a symbol from a custom font Pin
Mc_Topaz7-Sep-20 22:13
Mc_Topaz7-Sep-20 22:13 
AnswerRe: Problem showing a symbol from a custom font Pin
Mc_Topaz7-Sep-20 23:52
Mc_Topaz7-Sep-20 23:52 
QuestionDebug does not stop on errors. Pin
MAW306-Sep-20 15:27
MAW306-Sep-20 15:27 
AnswerRe: Debug does not stop on errors. Pin
Sandeep Mewara6-Sep-20 19:09
mveSandeep Mewara6-Sep-20 19:09 
AnswerRe: Debug does not stop on errors. Pin
OriginalGriff6-Sep-20 20:32
mveOriginalGriff6-Sep-20 20:32 
SuggestionRe: Debug does not stop on errors. Pin
Richard Deeming6-Sep-20 22:38
mveRichard Deeming6-Sep-20 22:38 
GeneralRe: Debug does not stop on errors. Pin
OriginalGriff6-Sep-20 22:51
mveOriginalGriff6-Sep-20 22:51 
QuestionChanging Caption in dt Pin
MAW306-Sep-20 15:22
MAW306-Sep-20 15:22 
AnswerRe: Changing Caption in dt Pin
OriginalGriff6-Sep-20 20:45
mveOriginalGriff6-Sep-20 20:45 
QuestionCan a button in a simple html-document somehow call a (clientside) C# method? Pin
arnold_w5-Sep-20 0:12
arnold_w5-Sep-20 0:12 
AnswerRe: Can a button in a simple html-document somehow call a (clientside) C# method? Pin
OriginalGriff5-Sep-20 0:30
mveOriginalGriff5-Sep-20 0:30 
GeneralRe: Can a button in a simple html-document somehow call a (clientside) C# method? Pin
arnold_w5-Sep-20 0:36
arnold_w5-Sep-20 0:36 

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.