Hello, I have an app doing tasks while it is minimized to the tray. But it keeps stealing focus from other things even while it is not visible. How can i make it so that it wont steal focus from other programs? Thanks!
If the value is within 0 - 255, I think it will be parsed clearly.
Can you tell me what is in bData. check it. If its default(byte) / 0 it will parse clearly using Convert.ToSingle as I checked.
Debug your application and see for what value of byte you are getting this.(just curious)
I've been doing interviews for a large multi national company for a number of C# contractors to work on a greenfield winforms application. In the last month I've interviewed 28 candidates and only 6 have passed our first technical test which is a 1/2 hour telephone screening. What I'm wondering is if our basic questions are viewed by the community as not fair game. Our basic premise is that if you can't answer four out of five of these basic questions (first ten minutes of interview) there is little point in pursuing things further.
1) What is the base object in C#.NET, its public instance methods and when would you use them? - I'm astonished how few people get this. I generally forgive forgetting GetHashCode but Equals?! - only maybe 25% of people get 3 out of the 4 methods (or 5 if you count Finalize which in general we don't).
2) What is a delegate? What is the difference between delegate.Invoke and delegate.BeginInvoke? - Really asking do you know the difference between synchronous and asynchronous programming. - maybe 20% get this.
3) Give a two minute overview of how the garbage collector works? (Looking for what makes an object eligible for collection, when it runs, concept of generations, implications of having a finalizer etc) - very poor understanding out there - I've had 1 good explanation so far.
4) Explain the OO concept of polymorphism and how you can take advantage of it in C#? Why do you think Microsoft didn't make all methods virtual by default? - I.e. whats a virtual function and to understand the performance implications of them. - most get the first, nobody so far the second.
5) Is ArrayList/List<t> a thread safe collection? If not how would you make it thread safe? - most get its not, only some really have any idea how to make it thread safe.
I just don't think these are hard questions, especially given the daily rates we are offering, but maybe I'm being too hard? What do you think?
Whats really strange is we're doing a lot of Java interviews for the server side of things as well and we've seen plenty of great candidates. Maybe there are just lots and lots of very poor C# candidates out there and I'm getting my fair share of them!
1) What is the base object in C#.NET, its public methods and when would you use them? - I'm astonished how few people get this. I generally forgive forgetting GetHashCode but Equals?! - only maybe 25% of people get 3 out of the 4 methods.
4 methods?? System.Object has 7. Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ReferenceEquals and ToString.
Fair point - badly phrased in my original post. The question does specify public instance methods not class (static) methods. We don't count Finalize as you can't call it directly but I would accept that. MemberwiseClone certainly wouldn't count as thats protected not public.
I would expect anyone applying to know this - plus the answer is in the question!
its public methods and when would you use them
How often do we actually use methods on object? I rarely do as the only use for object nowadays really is where generics are not appropriate, and at the first oportunity before doing anything with it it I unbox it. Not an excuse for not knowing the answer, but makes it a pointless question IMO.
What is a delegate? What is the difference between delegate.Invoke and delegate.BeginInvoke?
Give a two minute overview of how the garbage collector works?
How often do you really need to know this? I don't fully understand it. More important is what is the dispose pattern and when/how should it be implemented.
Explain the OO concept of polymorphism and how you can take advantage of it in C#? Why do you think Microsoft didn't make all methods virtual by default?
Is ArrayList a thread safe collection? If not how would you make it thread safe?
I'd be asking why you're planning on using an ArrayList instead of List<T> and explaining that thread safety or lack of applies to nearly everything in the framework, and then explain the various methods and costs of trying to acheive it.
People have commented at work on if asking about public methods on object is useful. I don't think knowing all 4 (or 5!) is necessary I agree but when to use them is absolutely imperative. If you don't know when to override Equals for example you can't have done much C# - well imho. I might rephrase this going forward.
We ask about the garbage collector precisely because we want them to talk about Finalize vs Dispose and how the dispose pattern is connected to garbage collection (GC.SuppressFinalize etc). We also feel for the types of applications we use which often require a lot of memory analysis to detect memory not being freed it is imperative to know whats going on in the GC.
If you'd have answered my ArrayList like that you'd come straight in for second round!! ArrayList question does indeed go two ways - one is why is List<t> better than ArrayList. Second goes down into the threading route of what can and can't you lock on, alternatives to plain lock etc. It depends on the candidate.
Yeah - I post here very rarely so apologies if this is in the wrong place!