Skip to main content
Removed from Network Questions by Thomas Owens
Question Protected by Thomas Owens
Tweeted twitter.com/StackSoftEng/status/1488980571711807495

What does it mean by "set" mean in programming languages like c#C#?

I've been reedingreading a book which was about C# programming language and faced the term set, So now my question is what. What does the word 'set' camemean in the following meansexcerpt?

Pattern matching with the switch statement: Like the if statement, the switch statement > supports pattern matching in C# 7.0 and later. The case values no longer need to be literal values; they can be patterns. Let's see an example of pattern matching with the switch statement using a folder path. If you are using macOS, then swap the commented statement that sets the path variable and replace my username with your user folder name:

  1. Add the following statement to the top of the file to import types for working with input/output: using System.IO;
  2. Add statements to the end of the Main method to declare a string path to a file, open it as either a readonly or writeable stream, and then show a message based on what type and capabilities the stream has, as shown in the following code:
  
  // string path ="/Users/markjprice/Code/Chapter03"; 
  string path => @"C:\Code\Chapter03"; 
  Write("Press R for readonly or W for write: ");
  ConsoleKeyInfo key = ReadKey(); 
  WriteLine(); ...

actually myMy question is about the following part:

If you areare using macOS, then swap the commented statement that    sets the path variable and replace mymy username with your user folder name

Would anybody exactly explain it to me?

What does it mean by "set" in programming languages like c#?

I've been reeding a book which was about C# programming language and faced the term set, So now my question is what the word 'set' came in the following means?

Pattern matching with the switch statement: Like the if statement, the switch statement > supports pattern matching in C# 7.0 and later. The case values no longer need to be literal values; they can be patterns. Let's see an example of pattern matching with the switch statement using a folder path. If you are using macOS, then swap the commented statement that sets the path variable and replace my username with your user folder name:

  1. Add the following statement to the top of the file to import types for working with input/output: using System.IO;
  2. Add statements to the end of the Main method to declare a string path to a file, open it as either a readonly or writeable stream, and then show a message based on what type and capabilities the stream has, as shown in the following code:
 
  // string path ="/Users/markjprice/Code/Chapter03"; 
  string path => @"C:\Code\Chapter03"; 
  Write("Press R for readonly or W for write: ");
  ConsoleKeyInfo key = ReadKey(); 
  WriteLine(); ...

actually my question is about the following part:

If you are using macOS, then swap the commented statement that  sets the path variable and replace my username with your user folder name

Would anybody exactly explain it to me?

What does "set" mean in programming languages like C#?

I've been reading a book about C#. What does the word 'set' mean in the following excerpt?

Pattern matching with the switch statement: Like the if statement, the switch statement supports pattern matching in C# 7.0 and later. The case values no longer need to be literal values; they can be patterns. Let's see an example of pattern matching with the switch statement using a folder path. If you are using macOS, then swap the commented statement that sets the path variable and replace my username with your user folder name:

  1. Add the following statement to the top of the file to import types for working with input/output: using System.IO;
  2. Add statements to the end of the Main method to declare a string path to a file, open it as either a readonly or writeable stream, and then show a message based on what type and capabilities the stream has, as shown in the following code:
 
// string path ="/Users/markjprice/Code/Chapter03"; 
string path => @"C:\Code\Chapter03"; 
Write("Press R for readonly or W for write: ");
ConsoleKeyInfo key = ReadKey(); 
WriteLine(); ...

My question is about the following part:

If you are using macOS, then swap the commented statement that  sets the path variable and replace my username with your user folder name

Would anybody explain it to me?

Post Reopened by Doc Brown, 8bittree, Flater
Post Closed as "Not suitable for this site" by gnat, Greg Burghardt, lennon310
Became Hot Network Question
edited tags
Link
Doc Brown
  • 220.3k
  • 35
  • 410
  • 623
edited tags
Link
Hossein
  • 75
  • 1
  • 4
added 40 characters in body
Source Link
Doc Brown
  • 220.3k
  • 35
  • 410
  • 623
Loading
Source Link
Hossein
  • 75
  • 1
  • 4
Loading