Unraveling Multimodality with Large Language Models.pdf
C# Test Paper's Answers
1. C# and ASP.NET Test Paper Answers
A1.(c) Classes
A2. (a) System.Object
A3. (d) A delegate object encapsulates a reference to a method
A4. (c) Start()
A5. Both String and StringBuilder are classes used to handle strings.
The most common operation with a string is concatenation. This activity has to be performed very
efficiently. When we use the "String" object to concatenate two strings, the first string is combined
to the other string by creating a new copy in the memory as a string object, and then the old string is
deleted. This process is a little long. Hence we say "Strings are immutable".
When we make use of the "StringBuilder" object, the Append method is used. This means, an
insertion is done on the existing string. Operation on StringBuilder object is faster than String
operations, as the copy is done to the same location. Usage of StringBuilder is more efficient in case
large amounts of string manipulations have to be performed.
A6. The Common Language Runtime (CLR) is the run time environment that provides the underlying
infrastructure for the .NET Framework. It is where the source code of an application is compiled into
an intermediate language. CLR translates the IL into the native code of the operating system using a
just-in-time (JIT) compiler. Not only does the CLR execute code, but it also provides a whole set of
related services such as code verification, optimization, and object management.
A7. System.Web.UI.Page
A8. The Global.asax file, also known as the ASP.NET application file, is an optional file that contains code
for responding to application-level events raised by ASP.NET.
A9. <appSettings>, <system.web> and <connectionStrings>
A10. // Create the cookie object.
HttpCookie cookie = new HttpCookie("Preferences");
// Set a value in it.
cookie["LanguagePref"] = "English";
// Add another value.
cookie["Country"] = "US";
// Add it to the current web response.
Response.Cookies.Add(cookie);