Tools.Contains() in regular C#

Hello, as I was doing this lesson I found Tools.Contains() to be very helpful, but as I tried to use it in regular C# it doesn’t exist. How would you create something like this in your own project.


Side Note- What is the term for something like Tools.Contains()?
Example: Program.cs would be called a class

Tools.cs is a file in that project that you can look at

1 Like

How do you like at files inside of a project on the tutorials page?
I understand where to look in C# IDE’s but where do you go to find them on here.

Hello, @blog5126251307, and welcome to the forums.

In the bash console on the right where you type dotnet run, you can enter the command ls. You’ll see Tools.cs listed as one of the files. If you’d like to view the contents of the file, you can execute
cat Tools.cs.

The Contains() method belongs to the Tools class.

1 Like

Not to mention that you can create and run c# programs to do whatever you want, including displaying a file.
But yeah, considering that there already exists several programs with that capability, use one of those instead: cat less more vi grep nano tail head sed, being some, and there are several language runtimes/compilers installed like perl, python, c, c++, nodejs … or one can get creative and send it over the internet with curl or any of the aforementioned languages, so you could for instance send it to a pastebin service