C# Common .NET Methods

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall with Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/12

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No study sessions yet.

13 Terms

1
New cards

Console.WriteLine()

Prints text or numbers to the screen. Example: Console.WriteLine("Hello"); prints Hello

2
New cards

Console.ReadLine()

Reads input from the user. Example: string name = Console.ReadLine(); stores user input in name

3
New cards

Math.Abs()

Returns the absolute value of a number. Example: int x = Math.Abs(-5); x is 5

4
New cards

Math.Pow()

Raises a number to a power. Example: double y = Math.Pow(2, 3); y is 8

5
New cards

Math.Sqrt()

Returns the square root of a number. Example: double y = Math.Sqrt(9); y is 3

6
New cards

string.Length

Returns the number of characters in a string. Example: int len = "Hello".Length; len is 5

7
New cards

string.ToUpper()

Converts text to uppercase. Example: string up = "hi".ToUpper(); up is "HI"

8
New cards

string.ToLower()

Converts text to lowercase. Example: string low = "HI".ToLower(); low is "hi"

9
New cards

string.Contains()

Checks if text contains a substring. Example: bool has = "Hello".Contains("H"); has is true

10
New cards

List.Add()

Adds an item to a list. Example: List nums = new List(); nums.Add(5); nums contains 5

11
New cards

List.Remove()

Removes an item from a list. Example: nums.Remove(5); nums no longer contains 5

12
New cards

List.Count

Returns the number of items in a list. Example: int c = nums.Count; c is 0

13
New cards