Click here to Skip to main content
15,887,336 members
Home / Discussions / C#
   

C#

 
QuestionDrawing a rectangle using GraphicsPath in C# doesn't complete the drawing (GDI+) Pin
jesuraj.pradeep8-May-14 20:05
jesuraj.pradeep8-May-14 20:05 
AnswerRe: Drawing a rectangle using GraphicsPath in C# doesn't complete the drawing (GDI+) Pin
Bernhard Hiller8-May-14 21:36
Bernhard Hiller8-May-14 21:36 
AnswerRe: Drawing a rectangle using GraphicsPath in C# doesn't complete the drawing (GDI+) Pin
OriginalGriff8-May-14 21:41
mveOriginalGriff8-May-14 21:41 
QuestionSearch and Retrieving String Pin
ASPnoob8-May-14 20:01
ASPnoob8-May-14 20:01 
AnswerRe: Search and Retrieving String Pin
Mycroft Holmes8-May-14 21:21
professionalMycroft Holmes8-May-14 21:21 
AnswerRe: Search and Retrieving String Pin
V.8-May-14 23:27
professionalV.8-May-14 23:27 
AnswerRe: Search and Retrieving String Pin
Emre Ataseven11-May-14 5:50
professionalEmre Ataseven11-May-14 5:50 
QuestionHandle Task Exception In Main Thread Pin
Kevin Marois8-May-14 14:31
professionalKevin Marois8-May-14 14:31 
I have an .Net 4.0 app that runs processes at specified intervals. My code uses reflection to run the process:

private static void executeProccess(ProcessEntity process)
{
    _ProcessBase instance = null;
    try
    {
        Assembly assembly = Assembly.LoadFrom(process.AssemblyName);
        Type type = assembly.GetType(process.TypeName);
        instance = (_ProcessBase)Activator.CreateInstance(type);
    }
    catch (Exception e)
    {
        LogMessage(e);
    }

    if (instance != null)
    {
        LogMessage(string.Format("Starting process '{0}'", process.Caption));

        var task = Task.Factory.StartNew<ProcessResponseEntity>(() => instance.Execute())
                                .ContinueWith(x => processCompleted(x.Result));

        task.ContinueWith(ExceptionHandler, TaskContinuationOptions.OnlyOnFaulted);

        // Pause to let the logging file to be saved from prior runs
        task.Wait(1000);
    }
}

private static void ExceptionHandler(Task task)
{
    var exception = task.Exception;
    Console.WriteLine(exception);
}


I can't see to get the exception handing code to work right. Is this the right way to do this?
If it's not broken, fix it until it is

QuestionDeveloping a .NET obfuscator. Need feedback. Pin
ianderf8-May-14 9:17
ianderf8-May-14 9:17 
AnswerRe: Developing a .NET obfuscator. Need feedback. Pin
Richard Andrew x648-May-14 11:05
professionalRichard Andrew x648-May-14 11:05 
GeneralRe: Developing a .NET obfuscator. Need feedback. Pin
ianderf8-May-14 11:10
ianderf8-May-14 11:10 
GeneralRe: Developing a .NET obfuscator. Need feedback. Pin
Richard MacCutchan8-May-14 22:46
mveRichard MacCutchan8-May-14 22:46 
QuestionBufferedGraphics object will AutoScroll position Pin
Chris Copeland8-May-14 7:23
mveChris Copeland8-May-14 7:23 
AnswerRe: BufferedGraphics object will AutoScroll position Pin
Chris Copeland8-May-14 9:20
mveChris Copeland8-May-14 9:20 
QuestionNUnit- Custom Property Attribute display in Test Explorer window Pin
ercharu228-May-14 6:37
ercharu228-May-14 6:37 
QuestionTextTransformation with VS Packages Pin
Kani Mozhi7-May-14 23:47
Kani Mozhi7-May-14 23:47 
QuestionCustom reporting solution with SSRS Pin
Tridip Bhattacharjee7-May-14 21:03
professionalTridip Bhattacharjee7-May-14 21:03 
AnswerRe: Custom reporting solution with SSRS Pin
Mycroft Holmes7-May-14 23:21
professionalMycroft Holmes7-May-14 23:21 
GeneralRe: Custom reporting solution with SSRS Pin
Tridip Bhattacharjee8-May-14 21:24
professionalTridip Bhattacharjee8-May-14 21:24 
AnswerRe: Custom reporting solution with SSRS Pin
ZurdoDev8-May-14 7:53
professionalZurdoDev8-May-14 7:53 
GeneralRe: Custom reporting solution with SSRS Pin
Mycroft Holmes8-May-14 19:06
professionalMycroft Holmes8-May-14 19:06 
GeneralRe: Custom reporting solution with SSRS Pin
Tridip Bhattacharjee8-May-14 21:23
professionalTridip Bhattacharjee8-May-14 21:23 
GeneralRe: Custom reporting solution with SSRS Pin
Mycroft Holmes8-May-14 21:53
professionalMycroft Holmes8-May-14 21:53 
AnswerRe: Custom reporting solution with SSRS Pin
ZurdoDev9-May-14 1:21
professionalZurdoDev9-May-14 1:21 
GeneralRe: Custom reporting solution with SSRS Pin
ZurdoDev9-May-14 1:20
professionalZurdoDev9-May-14 1:20 

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.