c#

Description

Flashcards on c#, created by wave.mose on 09/07/2016.
wave.mose
Flashcards by wave.mose, updated more than 1 year ago
wave.mose
Created by wave.mose over 9 years ago
10
0

Resource summary

Question Answer
Solution Explorer allows you to view items and perform item management tasks in a solution or a project. It also allows you to use the Visual Studio editors to work on files outside the context of a solution or project.
project file references one or more files containing the source code and other artifacts for the project, such as graphics images.
Properties This is a folder in the TestHello project. If you expand it (click the arrow next to Properties), you will see that it contains a file called AssemblyInfo.cs. S
AssemblyInfo.cs. AssemblyInfo.cs is a special file that you can use to add attributes to a program, such as the name of the author, the date the program was written, and so on. You can specify additional attributes to modify the way in which the program runs.
References This folder contains references to libraries of compiled code that your application can use. When your C# code is compiled, it is converted into a library and given a unique name. In the Microsoft .NET Framework, these libraries are called assemblies. Developers use assemblies to package useful functionality that they have written so that they can distribute it to other developers who might want to use these features in their own applications. If you expand the References folder, you will see the default set of references that Visual Studio 2015 adds to your project. These assemblies provide access to many of the commonly used features of the .NET Framework and are provided by Microsoft with Visual Studio 2015. You will learn about many of these assemblies as you progress through the exercises in this book.
App.config This is the application configuration file. It is optional, and it might not always be present. You can specify settings that your application specify settings that your application uses at run time to modify its behavior, such as the version of the .NET Framework to use to run the application. You will learn more about this file in later chapters of this book.
Program.cs This is a C# source file, and it is displayed in the Code and Text Editor window when the project is first created. You will write your code for the console application in this file. It also contains some code that Visual Studio 2015 provides automatically, which you will examine shortly.
Microsoft IntelliSense is the general term for a number of features: List Members, Parameter Info, Quick Info, and Complete Word. These features help you to learn more about the code you are using, keep track of the parameters you are typing, and add calls to properties and methods with only a few keystrokes.
Console this is the name of another class provided by the assemblies referenced by your application. It provides methods for displaying messages in the console window and reading input from the keyboard.
Writeline Method WriteLine is an overloaded method, meaning that the Console class contains more than one method named WriteLine— it actually provides 19 different versions of this method. You can use each version of the WriteLine method to output different types of data.
namespace A namespace is designed for providing a way to keep one set of names separate from another. The class names declared in one namespace does not conflict with the same class names declared in another.
.NET Framework class library The .NET Framework class library is a library of classes, interfaces, and value types that provide access to system functionality. It is the foundation on which .NET Framework applications, components, and controls are built. The namespaces and namespace categories in the class library are listed in the following table and documented in detail in this reference. The namespaces and categories are listed by usage, with the most frequently used namespaces appearing first.
System namespace The System namespace contains fundamental classes and base classes that define commonly-used value and reference data types, events and event handlers, interfaces, attributes, and processing exceptions. For example, the Console class lives within the System namespace. This means that its full name is actually System.Console.
The using directive uses: To allow the use of types in a namespace so that you do not have to qualify the use of a type in that namespace: C# using System.Text;
A using directive simply brings the items in a namespace into scope and frees you from having to fully qualify the names of classes in your code. Classes are compiled into assemblies.
assemblies An assembly is a file that usually has the .dll file name extension, although strictly speaking, executable programs with the .exe file name extension are also assemblies. An assembly can contain many classes. The classes that the .NET Framework class library includes, such as System.Console, are provided in assemblies that are installed on your computer together with Visual Studio. You will find that the .NET Framework class library contains thousands of classes. If they were all held in the same assembly, the assembly would be huge and difficult to maintain. (If Microsoft were to update a single method in a single class, it would have to distribute the entire An assembly is a file that usually has the .dll file name extension, although strictly speaking, executable programs with the .exe file name extension are also assemblies. An assembly can contain many classes. The classes that the .NET Framework class library includes, such as System.Console, are provided in assemblies that are installed on your computer together with Visual Studio. You will find that the .NET Framework clas
UWP The Visual Studio 2015 programming environment also contains everything you need to create graphical applications for Windows 10. These templates are referred to as Universal Windows Platform (UWP) apps because they enable you to create apps that function on any device that runs Windows, such as desktop computers, tablets, and phones. You can design the user interface (UI) of a Windows application interactively. Visual Studio 2015 then generates the program statements to implement the user interface you’ve designed.
XAML XAML stands for Extensible Application Markup Language, which is the language that Universal Windows Platform applications use to define the layout for the GUI of an application.
A statement is a command that performs an action, such as calculating a value and storing the result or displaying a message to a user. You combine statements to create methods.
syntax Statements in C# follow a well-defined set of rules describing their format and construction. These rules are collectively known as syntax. (In contrast, the specification of what statements do is collectively known as semantics.)
C# is a “free format” language, means that white space, such as a space character or a new line, is not significant except as a separator. In other words, you are free to lay out your statements in any style
The trick to programming well in any language .... The trick to programming well in any language is to learn the syntax and semantics of the language and then use the language in a natural and idiomatic way. This approach makes your programs easier to maintain. As you progress through this book, you’ll see examples of the most important C# statements.
Identifiers are the names that you use to identify the elements in your programs, such as namespaces, classes, methods, and variables.
In C#, you must adhere to the following syntax rules when choosing identifiers: You can use only letters (uppercase and lowercase), digits, and underscore characters. An identifier must start with a letter or an underscore. In a multiword identifier, start the second and each subsequent word with an uppercase letter. (This is called camelCase notation.)
The C# language reserves 77 identifiers for its own use, and you cannot reuse these identifiers for your own purposes. These identifiers are called keywords, and each has a particular meaning. Examples of keywords are class, namespace, and using. The C# language reserves 77 identifiers for its own use, and you cannot reuse these identifiers for your own purposes. These identifiers are called keywords, and each has a particular meaning. Examples of keywords are class, namespace, and using.
A variable is nothing but a name given to a storage area that our programs can manipulate. Each variable in C# has a specific type, which determines the size and layout of the variable's memory the range of values that can be stored within that memory and the set of operations that can be applied to the variable.
declaration statement You declare the type and name of a variable in a declaration statement.
primitive data types C# has a number of built-in types called primitive data types.
definite assignment rule c# does not allow you to use an unassigned variable. You must assign a value to a variable before you can use it; otherwise, your program will not compile.
regular arithmetic operations C# supports the regular arithmetic operations you learned in your childhood: the plus sign (+) for addition, the minus sign (–) for subtraction, the asterisk (*) for multiplication, and the forward slash (/) for division. The symbols +, –, *, and / are called operators because they “operate” on values to create new values.
Concatenation is the process of appending one string to the end of another string. When you concatenate string literals or string constants by using the + operator, the compiler creates a single string. No run time concatenation occurs. However, string variables can be concatenated only at run time. In this case, you should understand the performance implications of the various approaches.
Int32. Parse Converts the string representation of a number to its 32-bit signed integer equivalent. that you can use to convert a string value to an integer if you need to perform arithmetic computations on values held as strings.
String interpolation MessageDialog msg = new MessageDialog(“ Hello ” + userName.Text); String interpolation lets you use the following syntax instead: MessageDialog msg = new MessageDialog( $“ Hello {userName.Text}”); The $ symbol at the start of the string indicates that it is an interpolated string and that any expressions between the { and } characters should be evaluated and the result substituted in their place. Without the leading $ symbol, the string {username.Text} would be treated literally. String interpolation is more efficient than using the + operator. (String concatenation using the + operator can be memory hungry by virtue of the way in which strings are handled by the .NET Framework.) String interpolation is also arguably
Show full summary Hide full summary

Similar

Programming in C# Exam 70-483 Q&A
Richard Brown
Programming Goals: Creating a Learning Map for C#
Garrett Fortner
C# - Test Drive...!!
Prashant Singh R
C# Fundamentals
Robert Mulpeter
Introduction to Programming: C#
Isaiah Parker
Programming in C#: Exam 483
R M
C# Code Analysis Engine Developer - Can you do my job?
Hugh Wood
.NET midterm question
BigDady313 .