C# developer interview questions
2015-02-07 14:34
357 查看
the company, since as far as I know they might still be using this test for prospective employees. Correct answers are in green color.
1) The C# keyword ‘int’ maps to which .NET type?
System.Int16
System.Int32
System.Int64
System.Int128
2) Which of these string definitions will prevent escaping on backslashes in C#?
string s = #”n Test string”;
string s = “’n Test string”;
string s = @”n Test string”;
string s = “n Test string”;
3) Which of these statements correctly declares a two-dimensional array in C#?
int[,] myArray;
int[][] myArray;
int[2] myArray;
System.Array[2] myArray;
4) If a method is marked as
protected internal who can access it?
Classes that are both in the same assembly and derived from the declaring class.
Only methods that are in the same class as the method in question.
Internal methods can be only be called using reflection.
Classes within the same assembly, and classes derived from the declaring class.
5) What is boxing?
a) Encapsulating an object in a value type.
b) Encapsulating a copy of an object in a value type.
c) Encapsulating a value type in an object.
d) Encapsulating a copy of a value type in an object.
6) What compiler switch creates an xml file from the xml comments in the files in an assembly?
/text
/doc
/xml
/help
7) What is a satellite Assembly?
A peripheral assembly designed to monitor permissions requests from an application.
Any DLL file used by an EXE file.
An assembly containing localized resources for another assembly.
An assembly designed to alter the appearance or ‘skin’ of an application.
8) What is a delegate?
A strongly typed function pointer.
A light weight thread or process that can call a single method.
A reference to an object in a different process.
An inter-process message channel.
9) How does assembly versioning in .NET prevent DLL Hell?
The runtime checks to see that only one version of an assembly is on the machine at any one time.
.NET allows assemblies to specify the name AND the version of any assemblies they need to run.
The compiler offers compile time checking for backward compatibility.
It doesn’t.
10) Which “Gang of Four” design pattern is shown below?
C# developer interview questions
A representative of a high-tech company in United Kingdom sent this in today noting that the list was used for interviewing a C# .NET developer. Any corrections and suggestions would be forwarded to the author. I won’t disclose the name ofthe company, since as far as I know they might still be using this test for prospective employees. Correct answers are in green color.
1) The C# keyword ‘int’ maps to which .NET type?
System.Int16
System.Int32
System.Int64
System.Int128
2) Which of these string definitions will prevent escaping on backslashes in C#?
string s = #”n Test string”;
string s = “’n Test string”;
string s = @”n Test string”;
string s = “n Test string”;
3) Which of these statements correctly declares a two-dimensional array in C#?
int[,] myArray;
int[][] myArray;
int[2] myArray;
System.Array[2] myArray;
4) If a method is marked as
protected internal who can access it?
Classes that are both in the same assembly and derived from the declaring class.
Only methods that are in the same class as the method in question.
Internal methods can be only be called using reflection.
Classes within the same assembly, and classes derived from the declaring class.
5) What is boxing?
a) Encapsulating an object in a value type.
b) Encapsulating a copy of an object in a value type.
c) Encapsulating a value type in an object.
d) Encapsulating a copy of a value type in an object.
6) What compiler switch creates an xml file from the xml comments in the files in an assembly?
/text
/doc
/xml
/help
7) What is a satellite Assembly?
A peripheral assembly designed to monitor permissions requests from an application.
Any DLL file used by an EXE file.
An assembly containing localized resources for another assembly.
An assembly designed to alter the appearance or ‘skin’ of an application.
8) What is a delegate?
A strongly typed function pointer.
A light weight thread or process that can call a single method.
A reference to an object in a different process.
An inter-process message channel.
9) How does assembly versioning in .NET prevent DLL Hell?
The runtime checks to see that only one version of an assembly is on the machine at any one time.
.NET allows assemblies to specify the name AND the version of any assemblies they need to run.
The compiler offers compile time checking for backward compatibility.
It doesn’t.
10) Which “Gang of Four” design pattern is shown below?
相关文章推荐
- C# Basic Interview Questions
- C# and ASP.NET Interview Questions
- Fail Fast Vs Fail Safe Iterator In Java : Java Developer Interview Questions
- Java developer interview questions: The hard part
- C# Interview Questions
- BizTalk 2004/2006 Interview questions that every developer must know...
- Front-end-Developer-Interview-Questions面试题笔记(二)CSS篇
- Front-end-Developer-Interview-Questions面试题笔记(一)HTML篇
- Interview questions : Advanced C# questions
- CSS Questions:Front-end Developer Interview Questions
- C# Interview Questions and Answers
- Front-end-Developer-Interview-Questions面试题笔记(三)JS篇[0]
- General Questions:Front-end Developer Interview Questions
- C# Interview Questions
- 转:C# Interview Questions
- JS Questions:Front-end Developer Interview Questions
- C# Interview Questions:C#-English Questions
- C# Interview Questions:C#面试问题
- [译]Front-end-Developer-Interview-Questions
- C# Programming Interview Questions, Answers, and Explanations: Programming C# Certification Review