|
This is a meta-question. At best the people responsible for the C# definition can answer
this; everyone else can only guess. Whoever asks this does not intend to be called an idiot,
he intends to observe the interviewee's reaction. Not every question is about knowledge...
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
May be he was not a idiot afterall, he just din't want me in his team coz they were looking for a person with more experience.
hmm, anyway I always feel like asking the interviewer answers to his questions but I back off thinking that most of them don't like to be questioned!
|
|
|
|
|
I think none of the answers is really convincing. Maybe you should answer that we cannot know the motivation of the guys not to include it. Simplicity and avoiding errors might be an argument. On the other hand C# is not a simple language. It includes many complex and new features.
If you have the feeling the interviewer is not a fan of multiple inheritance you might say MI is an interesting idea, but you do not really need it in practical situations.
Rudolf Heijink
|
|
|
|
|
Hi Rudolf,
I told him it would make the language complex, but then he started asking "how complex"? I am new to C# and programming as a whole, and I dint know how complex it would make the language.
This is my experience in an interview where people don't want to ask you obvious questions. I used to google for interview questions and appear for the interview, but I failed miserably two times. I feel bad when I think about these interviews.
I want to dig deep in to topics, but when I start asking why (mostly to Google) something is done this way in .NET framework, rarely do I get good answers (articles/posts). How do you find answers to your questions, how do you get knowledgable?
Regards,
Blumen
|
|
|
|
|
blumenhause wrote: How do you find answers to your questions, how do you get knowledgable?
There are a lot of different ways:
- Reading books
- On your own investigating - write some code, see what it does and how it behaves
- Using tools like Reflector to see what/how the base class libraries do things
- Ask questions of people that have more experience and/or are more knowlegeable than you on a particular topic.
Since you are new to programming and C# (and also, it appears, to technical interviews), the thing to remember is this:
There are two types of interviewers: The kind that wants to show off how much he/she knows and the kind that wants to know how much you know and how you react to difficult/challenging questions.
The first type of interviewer is difficult to deal with at best as they tend to ask the "impossible" questions and drill into topics that are intentionally hard. The goal is to show you how smart they are and doesn't really help anybody.
The second type of interviewer will also ask difficult questions, but the entire interview won't consist of them. This is the person that will ask a mixture of easy to hard questions to try and understand how much you know on a particular topic and what your problem solving skills are.
Even after 15 years of experience I have been on interviews where I was asked a question that stumped me. It's always OK to say you don't know rather than trying to guess and get it wrong.
|
|
|
|
|
Thank you Scott, that was really informative.
Regards,
Blumen
|
|
|
|
|
blumenhause wrote: Why din't Microsoft include Multile inheritance in C#?
Very likely to ensure that developers don't encounter the diamond problem[^].
/ravi
|
|
|
|
|
Hedging their bets; it's easier to add it in later than to remove it.
|
|
|
|
|
Because they were making a child language (VB.NET). They didn't want VB programmers to jump from cliffs during the transition into real world programming.
|
|
|
|
|
Hi,
I have a SQL database and I want to display some items in my application with datagridview. I created stored procedures and datatables in my dataset. In one of the columns of the datagridview I want to draw an blinking image, but this image is not stored in database. For this image I have custom DGWCell and DGWColumn classes. How can I manipulate data while dataTable is creating? Or How can I override inherited DGWCell functions to draw an blinking image in that cell?
|
|
|
|
|
Use the ItemDataBound event. There are a few article on CP about this one of them mine as it happens.
|
|
|
|
|
Thank you for your reply.
ItemDataBound is a event of DataGrid and DataList, Since I am using DataGridView and developing windows application, this event is not useful.
|
|
|
|
|
hi I am sandipan,currently working on a project where I have to implement video chatting.Please help me how can i do that using .NET.
|
|
|
|
|
Hello,
I am having a form based application. In constructor of main application form it initiates a thread for hardware.
Now the hardware raises a event which is listned back in to the main form itself. Here i want to create a form which should be child of main form.
I am doing
frmSerialKeyInsert mFrmSerialKeyInsert ;
mFrmSerialKeyInsert = new frmSerialKeyInsert();
frmMDIMain.mFrmSerialKeyInsert.MdiParent = this;
But i got exception "controls create on one thread cannot be parented to a control on different thread"
How to solve this problem??
|
|
|
|
|
Look for Control.InvokeRequired and Control.Invoke()
only the main thread should access Controls.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
I have some problem about RMAN and C#.I don't understand command of RMAN that provide backup file as
i. data files
ii. control files
iii. redo log files
iv. archived log files
Could you tell me about how to use this 4 commands.
And I can't write C# that control RMAN backup file
Help me please. Thank you very much.
|
|
|
|
|
I'm trying to handle the exception in my project. If the exception raised in same thread, I can handle it by using Try/Catch statement... but I'm not sure how to handle in different thread.....
I have one window application called "WindowsApplication1" and one class library called "ClassLibrary1". I added "ClassLibrary1" to "WindowsApplication1" as a reference.
In WindowApplication1, I have the following code.
delegate void action2();<br />
private void button1_Click(object sender, EventArgs e)<br />
{ <br />
try<br />
{<br />
ClassLibrary1.Class1 obj = new ClassLibrary1.Class1 ();<br />
action2 del = new action2 (obj.foo);<br />
del.BeginInvoke( callback, del);<br />
}<br />
catch ( Exception ex )<br />
{<br />
MessageBox.Show (this,ex.Message);<br />
}<br />
}<br />
private void callback(IAsyncResult a)<br />
{<br />
try<br />
{<br />
action2 a2 = (action2)a.AsyncState;<br />
a2.EndInvoke (a);<br />
}<br />
catch (Exception ex)<br />
{<br />
MessageBox.Show (this, ex.Message);<br />
}<br />
}<br />
In ClassLibrary1.Class,
using System;<br />
using System.Collections.Generic;<br />
using System.Text;<br />
<br />
namespace ClassLibrary1 {<br />
public class Class1 {<br />
public void foo()<br />
{<br />
throw new Exception ("Why!!!");<br />
}<br />
}<br />
}<br />
When I run the application with "Control + F5" (without debugging), I got the messagebox ""Why!!!"" as the exception shown.
but when I run the application with "F5" (with debugging), I don't get the messagebox and Try/Catch statement from Form1 doens't work anymore..
So, How to handle the exception in different thread??
Any idea would be greatly appreciated. Let me know if you are not clear what I meant..
Thanks in advance.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
I need to set the text on various form controls(textbox,label,buttons, etc) across threads.
Right now, I have one method per control. Below is my SetButtonText method.
private delegate void SetButtonTextCallback(System.Windows.Forms.Button tBox, string text);
private void SetButtonText(System.Windows.Forms.Button tBox, string text)
{
if (tBox.InvokeRequired)
{
SetButtonBoxCallback d = new SetButtonTextCallback(SetButtonText);
this.Invoke(d, new object[] { tBox, text });
}
else
{
tBox.Text = text;
}
}
Is it possible to have a generic method that I can pass the control and the text. So the call would look like:
SetControlText(button1,"foo");
or
SetControlText(label3,"bar");
|
|
|
|
|
Just use System.Windows.Forms.Control instead of System.Windows.Forms.Button. Every Control has a Text property.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Wow! So easy easy, I missed it!
Thanks!
|
|
|
|
|
I have written a class that allows our application to manipulate the default printer of a workstation. The code below works perfectly on WinXP but not on Win2000...
ManagementObjectSearcher search = new ManagementObjectSearcher("select deviceid from win32_printer where default = TRUE");
Any suggestions?
|
|
|
|
|
Hi, everyone.
I am doing image alignment which compare the difference between two similiar screenshots and aligned the second image to first one. Now, I am able to solve the difference. For two similiar images, I can get the difference between them. But I am stucked at how to do the alignment. any suggests?
Thank you
|
|
|
|
|
I have a Grid View. Here I have a column "Active". I attached this GridView to objectDataSource. In database this field has true or false value.(1 or 0). But in Grid View I want to show that if this field has value 1 in database the value for this column should show "Yes" but if the value of this field is 0 in data base the The GridView should show "No".
How can I do that.
seema
|
|
|
|
|
Please don't cross post
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hide the Active column on the gridview
Create a new column not bound to a db field.
Use the ItemDataBound event to change the new column based on the contents of the hidden column
|
|
|
|