Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

.NET C# WinForms exam for trading company, what to read up on?

Options
  • 15-05-2011 8:18pm
    #1
    Registered Users Posts: 388 ✭✭


    Hi - tomorrow I'm doing an exam for a .NET development role in a trading company. The type of skills they are looking for are WinForms, multi-threading, delegates, events, etc. I'm more of an ASP.NET / middle tier / database developer but have done some WinForms in the past. I'm interested in the role as it's a foot in the door to trading software so I'd take the role if offered.

    I've had unsuccessful interviews in the past for similar roles, and they seem to look for the same thing i.e they ask about the Observer pattern, multi threading, and event creation and invocation, all of which I've been reading up on.

    Are there any sample projects or code out there that a typical trading system / platform would use? I feel like I'm missing something that all these systems use i.e. some design pattern or methodology that's common to these platforms.


Comments

  • Registered Users Posts: 981 ✭✭✭fasty


    Try looking for examples of the Model View Presenter pattern with Winforms. It's so easy to get stuck with magic pushbutton functions in Winforms that I think companies want to make sure you can separate logic from interface.

    Regarding multithreading, it's easy enough to dispatch work to other threads in .Net, but you're in a world of **** if you try to update the UI from another thread. That's where invoking events comes in.

    Code that caters for this problem looks like this:
    public void Querying(bool isQueryRunning)
            {
                if (this.InvokeRequired)
                {
                    this.Invoke(new Action<bool>(Querying), new object[] { isQueryRunning });
                }
                else
                {
                    this.buttonSubmit.Enabled = !isQueryRunning;
                }
            }
    

    You should know that calling invoke like that actually puts the event into the main threads's run loop as opposed to using the normal C# delegate mechanism.

    You could impress in an interview by knowing a bit about the Task Parallel library and how you can avoid using Invoke at all by getting the UI thread sync context...

    These are the sort of things I ask juniors in interviews but they rarely know the answer.


Advertisement