C# Looking for a c# prof (need help online test)

profiletom229
examc.doc

Name _____________________ Section ____ Date _______

CSC 325 Exam

1. Describe 3 steps for creating C# code that supports i18n.

2. Describe and compare two approaches that terminate a C# thread before this thread finished execution. Provide code skeletons for both approaches as well as reasoning for selecting a proper one.

3. Describe the reasoning for adding code attributes to modern programming languages.

4. Describe the model used by .NET and CLR to locate required localization resources at run-time.

5. Write a code snippet that creates and starts a C# foreground thread that asks the user to enter a double value and returns the 2nd power of this value.

6. Compare dynamic and static assemblies. When is it more efficient to use each of these assembly types?

7. Using LINQ, design and present the execution results for a query that extracts all strings at least 5 characters long from the following array and displays the results in alphabetical order:

string[] words = {“fine”, ”good”, ”best”, “worse”, “bestseller”, “box”, “window”, “wise”, “basketball”, “hockey”, “tennis”};

8. Describe, compare, and justify usage of any two different techniques for the thread synchronization in C#.

9. Describe the syntax for adding/removing multicast delegate components and executing them in the order of addition/removal. Include code sample that illustrates these techniques.

10. Using lambdas code a Func<T1, T2, TResult> delegate that takes as parameters a double and a long and returns the result of the division of its parameters.

11. Code an extension method for the String class. This method must return a String that has each character from the original String replaced by the next Unicode character, e.g. “Unicode” input should be returned as “Vojdpef”.

12. Describe and justify two pros and two cons of using the dynamic C# data type vs. static data typing.

13. Write a C# code fragment that creates a Tuple< string, string, double, int>, populates its components with real student’s studentID, name, gpa, and age and displays all four Tuple components to the screen using WriteLine method.

14. Describe how multi-file assemblies are used to provide support for the program’s localization.

15. Describe and compare two C# techniques for creating and executing asynchronous delegates.

PAGE

1