Professional Documents
Culture Documents
C# Lesson 5
C# Lesson 5
Jalil Verdiyev
TOPICS
2
PASS BY VALUE AND
REFERENCE
In c#, while you are calling a function and giving some
parameters, there are 2 ways that your parameters are sent to
the function. As we know that we have 2 data types: Value
type and reference types, for these 2 different types there are
different behaviors.
int a = 20;
Square(a);
// Will print 20
Console.WriteLine(a);
int a = 20;
ReadCountry(country);
string country;
ReadCountry(out country);
Console.WriteLine(country);
Length Rank
Length
As in array it returns the count of characters in a string
1 2 3 4 5 6 7 8 9 10
Compare() Concat() -> Contains() - EndsWith() - Equals() -> Join() -> ToLower(), Trim(), PadLeft(), and all
->compares, merges two >checks if the > returns true checks if the turns array ToUpper() TrimEnd(), PadRight() methods of
the given strings given string if the string string equals into string TrimStart() Array
strings is in the ends with the to given one
actual string given value