Click here to Skip to main content
15,892,199 members
Home / Discussions / C#
   

C#

 
AnswerRe: How do I set a breakpoint in an attached process in visual studio? Pin
Dave Kreskowiak4-Apr-19 9:24
mveDave Kreskowiak4-Apr-19 9:24 
GeneralRe: How do I set a breakpoint in an attached process in visual studio? Pin
Xarzu5-Apr-19 4:22
Xarzu5-Apr-19 4:22 
QuestionSimplify usage of a complex generic class for convenience Pin
Failwyn4-Apr-19 5:02
Failwyn4-Apr-19 5:02 
AnswerRe: Simplify usage of a complex generic class for convenience Pin
Gerry Schmitz4-Apr-19 5:10
mveGerry Schmitz4-Apr-19 5:10 
GeneralRe: Simplify usage of a complex generic class for convenience Pin
BillWoodruff5-Apr-19 21:00
professionalBillWoodruff5-Apr-19 21:00 
AnswerRe: Simplify usage of a complex generic class for convenience Pin
Richard Deeming4-Apr-19 9:28
mveRichard Deeming4-Apr-19 9:28 
GeneralRe: Simplify usage of a complex generic class for convenience Pin
BillWoodruff5-Apr-19 4:03
professionalBillWoodruff5-Apr-19 4:03 
GeneralRe: Simplify usage of a complex generic class for convenience Pin
Richard Deeming5-Apr-19 5:34
mveRichard Deeming5-Apr-19 5:34 
Odd - it works fine for me:
Generic class factory | C# Online Compiler | .NET Fiddle[^]
using System;

public class Program
{
    public static void Main()
    {
        Console.WriteLine(MyClass.Create(Guid.NewGuid()).GetType());
        Console.WriteLine(MyClass.Create("Hello", 42, 123.45M, DateTime.Today).GetType());
    }
}

public class MyClass<T1, T2, T3, T4> 
{
    public MyClass(T1 value1, T2 value2, T3 value3, T4 value4) { }
}

public static class MyClass
{
    public static MyClass<T1, T2, T3, T4> Create<T1, T2, T3, T4>(T1 value1, T2 value2, T3 value3, T4 value4)
    {
        return new MyClass<T1, T2, T3, T4>(value1, value2, value3, value4);
    }
    
    public static MyClass<T1, T1, T1, T1> Create<T1>(T1 value)
    {
        return new MyClass<T1, T1, T1, T1>(value, value, value, value);
    }
}
Output:
MyClass`4[System.Guid,System.Guid,System.Guid,System.Guid]
MyClass`4[System.String,System.Int32,System.Decimal,System.DateTime]




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

GeneralRe: Simplify usage of a complex generic class for convenience Pin
BillWoodruff5-Apr-19 16:37
professionalBillWoodruff5-Apr-19 16:37 
GeneralRe: Simplify usage of a complex generic class for convenience Pin
Richard Deeming15-Apr-19 8:15
mveRichard Deeming15-Apr-19 8:15 
GeneralRe: Simplify usage of a complex generic class for convenience Pin
BillWoodruff15-Apr-19 19:06
professionalBillWoodruff15-Apr-19 19:06 
GeneralRe: Simplify usage of a complex generic class for convenience Pin
Richard Deeming16-Apr-19 7:32
mveRichard Deeming16-Apr-19 7:32 
AnswerRe: Simplify usage of a complex generic class for convenience Pin
BillWoodruff5-Apr-19 20:12
professionalBillWoodruff5-Apr-19 20:12 
GeneralRe: Simplify usage of a complex generic class for convenience Pin
Gerry Schmitz6-Apr-19 11:03
mveGerry Schmitz6-Apr-19 11:03 
GeneralRe: Simplify usage of a complex generic class for convenience Pin
BillWoodruff6-Apr-19 11:20
professionalBillWoodruff6-Apr-19 11:20 
GeneralRe: Simplify usage of a complex generic class for convenience Pin
BillWoodruff6-Apr-19 15:44
professionalBillWoodruff6-Apr-19 15:44 
AnswerRe: Simplify usage of a complex generic class for convenience Pin
BillWoodruff6-Apr-19 12:57
professionalBillWoodruff6-Apr-19 12:57 
QuestionWhere are the libraries located in C#? Pin
Brian_TheLion3-Apr-19 20:15
Brian_TheLion3-Apr-19 20:15 
AnswerRe: Where are the libraries located in C#? Pin
OriginalGriff3-Apr-19 21:34
mveOriginalGriff3-Apr-19 21:34 
GeneralRe: Where are the libraries located in C#? Pin
Brian_TheLion3-Apr-19 23:20
Brian_TheLion3-Apr-19 23:20 
GeneralRe: Where are the libraries located in C#? Pin
OriginalGriff3-Apr-19 23:28
mveOriginalGriff3-Apr-19 23:28 
GeneralRe: Where are the libraries located in C#? Pin
Brian_TheLion4-Apr-19 0:06
Brian_TheLion4-Apr-19 0:06 
GeneralRe: Where are the libraries located in C#? Pin
OriginalGriff3-Apr-19 23:31
mveOriginalGriff3-Apr-19 23:31 
GeneralRe: Where are the libraries located in C#? Pin
Brian_TheLion3-Apr-19 23:58
Brian_TheLion3-Apr-19 23:58 
GeneralRe: Where are the libraries located in C#? Pin
Brian_TheLion4-Apr-19 0:02
Brian_TheLion4-Apr-19 0:02 

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.