Term
|
Definition
Every C# program begins with the execution of its Main method |
|
|
Term
What is the differents between functions and procedures methods in C# ? |
|
Definition
- Functions method return values
- Procedures do not
Functions invoke for their value
Procedures are invoded for their effect
Methods can accept parameters
|
|
|
Term
Methods without value -void |
|
Definition
Methods which do not return any value
- Called for their effect
- Often to change the value of the instance variables
- Such methods (other than Constructors) must be declared to have a return type of void
|
|
|
Term
|
Definition
public void MoveTo(double x, double y)
{
this.x = x;
this.y = y;
}
Note MoveTo() void methods returns no result hence no return statement |
|
|
Term
Explain in details :
public void MoveTo(double x, double y)
{
this.x = x;
this.y = y;
}
|
|
Definition
public void MoveTo(double x, double y)
- Parameters x and y are called formal parameters or formal arguments of MoveTo
The type of formal parameter can be simple ( int, doulbe ,bool) or a reference ( Circle , Rectangle )
- Formal parameters can be used as if they were local variables within the method |
|
|
Term
Class variables and methods |
|
Definition
It is possible to have variables and methods that belong to the class rather than to its instance
- Class variables shared between all instances
- Class methods invoked on the class itself , rather than specific instance
|
|
|
Term
Declaring Class Variables and methods: |
|
Definition
A class variable or method is declared with the keyword static
// declaration of Sqrt in the class Math:
public static double Sqrt(double d);
This can be invoked by
double sq_x = Math.Sqrt(9.6754) |
|
|
Term
|
Definition
Using constructors , it when a class or struct is created , it is refer as constructor , usually initialize the data members of the new object. example :
public mySampleClass()
{
// this is the constructor method see the differents !
}
mySampleClass obj = new mySampleClass()
|
|
|
Term
What is constructor Overloading |
|
Definition
its when you have the same constructor name example mySampleCalss() repeated more than once example would be :
public class mySampleClass
{
public mySampleClass()
{
}
public mySampleClass(int Age)
{
}
public mySampleClass(int Age, string Name)
{
}
} |
|
|
Term
|
Definition
A complex number is a number that can be expressed in the form a + bi where a and b are real numbers and i is the imaginary unit. |
|
|
Term
What is a Namespace and Types Names? |
|
Definition
Namespace use a dotted syntax to denote a hierarchical grouping with each level separated by a dot (.) waheed.house.building= 345566 |
|
|
Term
|
Definition
In C# types describle values.
Types in C# are divided into value types and reference types.
Value type describle values that are completely self contained
Reference types: however store a reference to a value rather than the actual value. |
|
|
Term
|
Definition
Just as a reminder, overloading is what happens when you have two methods with the same name but different signatures.
- overloading should be used for convenience
|
|
|
Term
|
Definition
A Class is a template from which software objects are made. Example button control , double click on button and you enter the button class are
public void button_click(boolen T)
{
this would be seen as a class
}
|
|
|
Term
Rember Object is a instance of a class |
|
Definition
|
|
Term
|
Definition
This covert string to a number integer value int32 |
|
|
Term
|
Definition
static makes a member of a class part of a class rather than part of an instance of the class. This means that you don’t need to create an instance of a class to make use of a static member
|
|
|
Term
|
Definition
You use the const keyword to declare a constant field or a constant local. Constant fields and locals aren't variables and may not be modified. Constants can be numbers, Boolean values, strings, or a null reference. Don’t create a constant to represent information that you expect to change at any time. For example, don’t use a constant field to store the price of a service, a product version number, or the brand name of a company. These values can change over time, and because compilers propagate constants, other code compiled with your libraries will have to be recompiled to see the changes. See also the |
|
|