1. What’s the advantage of using System.Text.StringBuilder over System.String?
StringBuilder is more efficient in cases where a large amount of manipulation is done in the text. Strings are immutable, so it is increasingly being operated, a new instance is created.
2. Can you store multiple data types in System.Array?
No.
3. What’s the difference between the System.Array.CopyTo() and System.Array.Clone()?
The first three performs a deep copy of the array, the second three is shallow.
4. How can you sort the elements of the array in descending order?
By calling Sort() and then Reverse() methods.
5. What’s the C# equivalent of C++ catch (…), which was a catch-all statement for any possible exception?
A catch block that catches the exception of type Process.Exception. You can also omit the parameter information type in this case and write catch {}.
6. Why is it a bad idea to throw your own exceptions?
Well, if that point is known that an error has occurred, why not write the code of law to resolve this error, instead of passing a new Exception object to the catch block? Start your own exclusions means that some design flaws in the project.
7. What’s a delegate?
A delegate object encapsulates a reference to a system. In C++ they were referred to as function pointers.
8. How’s the DLL Hell problem solved in .NET?
Assembly versions allows the application to specify not only the library it needs to function (which was available under Win32), but also the version of the Assembly.
9. What are the ways to deploy an assembly?
An MSI installer, a CAB archive, and XCOPY command.
10. What’s a satellite assembly?
When writing a multilingual application in multi-cultural. NET, and need to deliver the core application separately from the localized modules, the localized assemblies that change the core application are called satellite assemblies.
11. What’s the difference between // comments, /* */ comments and /// comments?
Single-line, multi-line and XML documentation comments.
12. How do you generate documentation from the C# file commented properly with a command-line compiler?
Compile it with a /doc switch.
13. What’s the difference between <c> and <code> XML documentation tag?
Single line code example and multiple-line code example.
14. What debugging tools come with the .NET SDK?
Cordbg - command-line debugger, and DbgCLR - graphic debugger. Visual Studio. NET uses the DbgCLR. Cordbg To use, you must compile the original C # using the / debug.
15. What does assert() do?
In debug compilation, assert themselves in a Boolean condition as a parameter, and displays the error dialog if the condition is false. The program continues without interruption if the condition is true.
16. Why are there five tracing levels in System.Diagnostics.TraceSwitcher?
The tracing dumps can be detailed for some applications that are constantly walking, you run the risk of overloading the machine and the hard drive there. Six levels range from None to detail, which allows you to change search activities.
17. How do you debug an ASP.NET Web application?
Attach the aspnet_wp.exe process to the DbgClr debugger.
18. What are three test cases you should go through in unit testing?
Positive check cases (correct information, correct output), negative check cases (broken or missing information, proper handling), exception check cases (exceptions are thrown & caught properly).
19. Can you change the value of a variable while debugging a C# application?
Yes, if you are debugging via Visual Studio.NET, just go to Immediate window.
20. What are advantages and disadvantages of Microsoft-provided data provider classes in ADO.NET?
SQLServer.NET information provider is high speed and robust, but requires purchasing a license for Microsoft SQL Server. OLE-DB.NET is universal for accessing other sources, such as Oracle, DB2, Informix and Microsoft Access, but it is. Network layer on top of OLE layer, so do not fastest in the world. ODBC.NET is a deprecated layer provided for backward compatibility with ODBC engines.
21. What is the wildcard character in SQL? Let’s say you want to query database with LIKE for all employees whose name starts with La.
The wildcard character is %, the proper query with LIKE would involve ‘La%’.
22. Explain ACID rule of thumb for transactions.
Transaction must be atomic (that is four units of work and not depend on previous and subsequent transactions), made (the information is confirmed or roll back, no "between" if something has been updated and something is not any), isolated (no transaction sees the intermediate results of the current transaction), Durable (the values persist if the information had been committed, even if the process is blocked just after).
23. What does the parameter Initial Catalog define inside Connection String?
The database name to connect to.
24. What is a pre-requisite for connection pooling?
Multiple processes must agree that they will share the same connection, where each parameter is the same, including security settings.
25. What’s the data provider name to connect to Access database?
Microsoft.Access.
0 comments:
Post a Comment