Untitled Deck Flashcards
What is the most popular language for the .NET platform?
“C# is the most popular language for the .NET platform
On what devices can C# programs run?
“C# programs can run on many devices
What kind of language is C#?
“C# is a cross-platform
What are C#’s ecosystem and workload benefits?
“C# has broad support in the ecosystem and is compatible with all .NET workloads.”
What programming principles and paradigms does C# support?
“C# is based on object-oriented principles and incorporates features from other paradigms
What low-level features does C# include?
“C# includes low-level features that support high-efficiency scenarios without requiring unsafe code.”
What are most .NET runtime and libraries written in?
“Most .NET runtime and libraries are written in C#
What is the purpose of the ‘Hello, World’ program in C#?
“The ‘Hello
Write a single-line ‘Hello, World’ program in C# using top-level statements.
”// This line prints ‘Hello
What does a single-line comment in C# look like?
“Single-line comments in C# start with // and continue to the end of the current line.”
What does a multi-line comment in C# look like?
“Multi-line comments in C# start with /* and end with */.”
What does the WriteLine method do?
“The WriteLine method of the Console class produces the output of a program. It is part of the System namespace.”
Write a ‘Hello, World’ program with a Main method in C#.
“using System;\n\nclass Hello\n{\n static void Main()\n {\n // This line prints ‘Hello
What does a ‘using’ directive in C# do?
“A ‘using’ directive references a namespace
What is the purpose of namespaces in C#?
“Namespaces provide a hierarchical means of organizing C# programs and libraries.”
What is the role of the static modifier in C# methods?
“The static modifier indicates that a method operates without reference to a particular object
What is the entry point for a C# program without top-level statements?
“The entry point is a static method named Main when there are no top-level statements.”
How does the compiler handle top-level statements in C#?
“When using top-level statements
Where can you start learning C# as a beginner?
“Beginner tutorials and links in C# documentation are good starting points. Experienced developers can also read tips for transitioning from Java
What makes C# approachable for developers?
“C# is approachable for beginners and offers advanced features for experienced developers writing specialized applications. Developers can quickly become productive and learn more specialized techniques as needed.”
What memory management benefit does C# provide?
“C# apps benefit from the .NET Runtime’s automatic memory management and extensive runtime libraries provided by the .NET SDK.”
What are platform-independent libraries in .NET?
“Platform-independent libraries in .NET include file system libraries
What are some workload-specific libraries in .NET?
“Workload-specific libraries include ASP.NET Core web libraries and the .NET MAUI UI library.”
What is NuGet, and how does it relate to C#?
“NuGet is a rich open-source ecosystem that augments the libraries provided by the .NET runtime with additional components.”