.NET Framework statements — FCL is OOP, CLR hosts apps.
Both True
Method for memory cleanup in C#?
All of these: Dispose, Finalize, GC.Collect
Free Visual Studio for Azure DevOps interactions (non-devs)?
Team Explorer 2019
True .NET statements about CTS & XML classes?
ii and iii only
Correct about indexers?
Invoked through instance index, declared with 1+ params
CTS matches with?
Describes how data types are declared
Which of the following statements about LINQ are true?
1. LINQ is a programming model introducing data querying methodology for implementing queries
2. LINQ has a syntax quite different from SQL
3. LINQ can be used to query in-memory object collections, SQL databases, and XML
4. LINQ enables developers to work with different formats of data across various data sources
Correct: 1, 3, 4
Which of the following new features replaces a block of code with a single statement for execution?
i) Improved throw Expressions
ii) More Expression-bodied Members
Correct Answer: ii only
Which pattern matching is introduced in C# 9.0?
Correct Answer: Positional pattern
What is used to deconstruct an expression result and test if the resulting values match the nested patterns?
Correct Answer: Positional pattern
Explanation: Used with Deconstruct() methods to match nested patterns.
What C# feature reads attributes or other code elements using Roslyn analysis APIs?
Improved Support for Code Generators
Which of the following is/are new features of C# 9.0?
- Native sized integers
- Function pointers
- Omitting the localsinit flag
Correct Answer: All of these
Which page is a special view page containing the statement declaration to include the Layout page?
_ViewStart.cshtml
What provides a complete platform to create a Web application (also called Web app)?
.NET 5.0
Which of the following statements about different types of C# statements are correct?
- Selection statements transfer the flow from one block to another
- Iteration statements help you execute a block repeatedly
- Jump statements transfer control after condition check
- Exception handling statements manage execution hindrances
Correct Answers:
✔️ Selection – Correct
✔️ Iteration – Correct
What is ‘into’ used for in LINQ?
Used to introduce a range variable to store sub-expression results in a query expression.
What is ‘by’ used for in LINQ?
Used in a group clause.
What is ‘from’ used for in LINQ?
Used to indicate a data source and a range variable.
What is ‘let’ used for in LINQ?
Used to indicate an identifier which serves as a reference to the results of a join, select, or group clause.
Which of the following keywords are associated with iteration statements?
Correct Answer: foreach, while
Which of following is not true for Properties?
Correct Answer: Can never be declared as static
A method can contain a parameter that a developer can pass by reference using the _______ keyword.
Correct Answer: ref
The ________ keyword, is also useful for passing a parameter by reference.
Correct Answer: out
From which version onwards can developers specify the data type of all out parameters inline instead of declaring them prior to passing them as parameters?
Correct Answer: C# 7.0