C # interview question C # Question No. 3

Source: Internet
Author: User
Tags dot net dot net framework
1. What are the differences between property and attribute in C #? What are their respective uses? What are the advantages of this mechanism?
2. Let's talk about the web service you understand. In the dot NET Framework, how can we combine XML well? (Just talk about the concept)
3. What are the characteristics of C #, Java, and C ++? What are the similarities and differences between C # and Java?
4. C # Can I perform direct operations on the memory? (This is a difficult issue? Note !)
5. How to combine the unmanaged code written in Visual C ++ 6.0 with other dot NET Component in CLR?
6. Some previous projects? Introduce your programming experience. (This is not confusing. It is true or false when you first ask)
7. What do you expect from the company? What are your salary expectations? Why computer science? Previous work experience (which is very important )?

Q3: Maintain database integrity and consistency. Do you like to use triggers or write business logic? Why?
Q4: ADO. What are the main improvements to net over ado?
Q5: Asp. Net compared with ASP, what are the main advances?
Q6: What is the delegate in C? Is an event a delegate?
Q7: describes the implementation process of the indexer in C #. Can indexes be performed only by numbers?
Q8: How does one implement a class that supports foreach traversal in C?
Q10: Write an HTML page to implement the following functions: "Hello" is displayed when you click the page with the left-click button, and "disabled right-click" is displayed when you right-click the page ". The page is automatically closed in 2 minutes.
Q11: Do you know about XMLHTTP and WebService? Briefly describe its features and functions
Q12: What is the difference between an interface and an abstract class? What is the basis for using interfaces and abstract classes?
Q13: What are the similarities and differences between custom controls and general user controls? If you want to use either of the two, which one do you choose? Why?
Q14: Describe ASP. NET Server Control Lifecycle
Q15: UML
Q16: object-oriented concept, Main Features
Q17: basis for classification. Class granularity issues
Q18: Transaction Management Problems

First, let's talk about the differences between final, finally, and finalize.
Second, can anonymous inner class (anonymous internal class) be extends (inherited) other classes, or implements (implemented) interface (Interface )?
Third, the difference between static nested class and inner class is that the more you say, the better (the more general the interview questions are ).
Fourth, the difference between & and.
Fifth, the difference between hashmap and hashtable.
Sixth, the difference between collection and collections.
7. When to use assert.
Eighth, what is GC? Why does GC exist?
Ninth, string S = new string ("XYZ"); how many string objects are created?
10. How much is math. Round (11.5? Math. Round (-11.5) and so on?
11th, short S1 = 1; S1 = S1 + 1; what is the error? Short S1 = 1; S1 + = 1; what is the error?
12th. What is the difference between sleep () and wait?
13th. Does Java have a goto?
14th, does the array have the length () method? Does string have the length () method?
15th, the difference between overload and override. Can the overloaded method change the type of the returned value?
16th. The elements in the set cannot be repeated. How can we identify whether the elements are repeated or not? Is = or equals () used ()? What are their differences?
17th. Give me the most common runtime exception.
18th, what is the difference between error and exception?
19th, list, set, and map are inherited from the collection interface?
20th. What is the difference between abstract class and interface?
21st can abstract methods be both static, native, and synchronized?
22nd. Can an interface inherit an interface? Can an abstract class implement the (implements) interface? Can an abstract class inherit a concrete class )?
23rd. Is run () or start () used to start a thread ()?
24th. Can constructor be overwritten?
25th. Can I inherit the string class?
26th. After a thread enters a synchronized method of an object, can other threads access other methods of this object?
27th, there is a return statement in try {}, so will the code in finally {} following this try be executed? When will it be executed, before or after return?
28th. Programming question: how many equals 2x8 in the most efficient way?
29th, the two objects have the same value (X. Equals (y) = true), but different hash codes are available, right?
30th. After an object is passed as a parameter to a method, this method can change the attributes of the object and return the changed result, so is it a value transfer or a reference transfer?
31st. Does swtich work on byte, long, and string?
32nd programming question: Write a singleton.

Database:

1. Differences between stored procedures and functions
2. What is a transaction?
3. What is the role of a cursor? How do I know that the cursor has reached the end?
4. triggers are divided into pre-trigger and post-trigger. There are differences between these two triggers. What is the difference between statement-level triggering and row-level triggering.

1. Use C # to implement the following functions
A generates an int array with a length of 100 and inserts 1-100 randomly into the array, which cannot be repeated.
B sorts the array generated above, which must be in ascending or descending order.
2. Describes several common methods for passing parameters between pages in. NET and their advantages and disadvantages.
3. Describe the error handling mechanism in. NET and give an example.
4. Please describe the meaning of a strong name
5. List several cycles in C # and point out their differences
6. Indicate all types of base classes in. net
7. Indicate the meaning of GAC
8. In SQL srever, new data is inserted into a table, and how to quickly obtain the current value of the Self-increment Field

Under what circumstances will you use the virtual method? What is the difference between it and the interface?
Q: What is the difference between override and overload?
Q: What is the difference between the value type and the reference type?
Q: How do I understand static variables?
Q: How many requests can be sent to the server?
Q: What is the difference between datareader and dataset?
Q: If you need to pass variable values in a B/S system, but you cannot use session, cookie, and application, how can you handle them?
Q: How many layers of B/S structure do you use. Net for development? What is the relationship between each layer and why do you need to layer it like this?
Q: How many stages are there in the software development process? What is the role of each stage?
Q: Microsoft has launched a series of application blocks. What are the application blocks you know and their functions?
Q: Please list some of the design patterns you have used and when to use them?
Q: What do you know about WebService?
Q: How are you interested in programming? How can I solve problems that I don't understand at work? How do you improve your programming skills?
Q: Why did you leave?
Q: How do I pass Chinese parameters through hyperlinks?
Q: Please program all textbox controls on the page and assign it a string. Empty?
Q: How can I program a Bubble sorting algorithm?

1. Differences between override and overload
2. What is the error handling mechanism of. Net?
3. Similarities and Differences between interfaces and classes in C #
4. Differences between datareader and Dataset

1. Which of the following methods can be used to access the member functions and attributes of the other class? For more information, see.
2. If you need to record the number of instances of the class, write a simple class to prove how to implement it.
3. class A is the base class of class B and has its own constructor. For example, we recommend that you describe the execution process of Class B's constructor from Instantiation to extinction.
4. to process a string, remove the spaces at the beginning and end of the string. If there are consecutive spaces in the string, only one space is reserved, that is, multiple spaces are allowed in the string, however, the number of consecutive spaces cannot exceed one.

I. Fill in blank questions
Where is the ternary operator in 1. C __? :___?
2. When integer a is assigned to an object, integer A will be _ packed (encapsulated )___?
3. Which of the following types of Class Members are accessible? This.; new class (). method;
4. Public static const int A = 1; is this Code incorrect? What is it? Const cannot be modified using static
5. Float F =-123.567f;
Int I = (INT) F;
Which of the following is the I value _____? 123
6. I used operator to declare and only declared "=". Is there any error?
7. What is the keyword of the delegate statement ______? Delagete
8. What are the characteristics of classes modified with sealed? Sealed and cannot inherit
9. All Custom User Controls in Asp.net must inherit from ________? Control
10. In. net, all serializable classes are marked _____?
11. In. Net hosting code, we don't have to worry about memory vulnerabilities. This is because ______? GC
12. Are there any errors in the following code? _______
Using system;
Class
{
Public Virtual void F (){
Console. writeline ("a.f ");
}
}
Abstract class B:
{
Public abstract override void F (); // new public abstract void F ();
}

13. when class t only declares the constructor of a private instance, ___ can ___ (can or cannot) derive a new class from T outside the program text of T, it is not allowed to create any instance of t directly (either or not.
14. Is there any error in the following code?
Switch (I ){
Case ():
Casezero ();
Break;
Case 1:
Caseone ();
Break;
Case 2:
Dufault; // wrong
Casetwo ();
Break;
}
15. Can system. Web. UI. Page be inherited in. Net? Yes

Ii. Short answer
1. What are the meanings of using and new keywords in C? Using command and statement new create instance new hide methods in base class
4. What are the differences between classes and structures? The class is a reference type and the structure is a value type.
5. A string of 10000 characters is randomly extracted from a-Z to form a string of 10000 characters. Use C # To write the main program.
6. For such an enumeration type:
Enum color: byte {
Red,
Green,
Blue,
Orange
}
String [] Ss = enum. getnames (typeof (color ));
Byte [] BB = enum. getvalues (typeof (color ));
Test a program to display all the symbol names defined in the enumeration type and their corresponding values.
7. Do you know the design mode? List the names of the design patterns you know. //
8. set a table in SQL Server to save the tree structure of the organization chart (assuming that only the name is required in the structure chart). If I want to query all the positions under a certain position, what are your ideas about using a stored procedure?
9. What is SQL injection and how to prevent it? For example.
10. What is the output of the following code? Why?
Int I = 5;
Int J = 5;
If (object. referenceequals (I, j ))
Console. writeline ("Equal ");
Else
Console. writeline ("not equal ");
// Not equal because the object is compared

1. Write a method to flip a string and add some conditions, such as "," and ".", to design and test its use case.
2. Design a test case for a paper cup (it can be a cup in a broad sense, not necessarily a cup with a specific function)
Development language concepts
3. What is reflection?
4. How to Write Design Patterns with Singleton
5. What is the garbage collection mechanism in C?
6. What is application pool?
7. What are the advantages and disadvantages of the differences between linked lists and arrays.
8. How to Implement remoting on the client server?
9. What is a friend function?
10. How to Implement polymorphism with standard C?
11. What is a virtual function?
12. What is an abstract function?
13. What is memory leakage? How can I determine whether a memory leak is detected in the simplest way?

English
14. The main functions of projects using C #/C ++ are described in English.
15. How do I communicate with American engineers if I want to hold a conference call with the US?
16. What would you do if the boss thinks your technology is lagging behind?

Database knowledge questions
17. Tools used to call stored procedures
18. What are the two indexes of SQL Server? What is the role of an index? What are the advantages and disadvantages of indexes?
19. Functions of triggers

Other knowledge questions and questions
20. What is Web service?
21. What is XML?
22. How to Implement socket?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.