Question: I am trying to create a toggle switch described as [w3school](https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_switch). But I want to be my slider look like [![ok](https://i.stack.imgur.com/luPLw.png)](https://i.stack.imgur.com/luPLw.png) [![notok](https://i.stack.imgur.com/cL1Hf.png)](https://i.stack.imgur.com/cL1Hf.png) 

All I can come up with 

[![enter image description here](https://i.stack.imgur.com/RDn1i.png)](https://i.stack.imgur.com/RDn1i.png) [![enter image description here](https://i.stack.imgur.com/iAQrG.png)](https://i.stack.imgur.com/iAQrG.png)

Background color is not important the position of the slider is.
Any help is appreciated.

Answer: 
Replace the lines

```
Console.WriteLine(file);
Console.ReadLine();

```

with a method to store them in a list.  

For example

```
foundFiles.Add(file);

```

Then when the method is done, you can read all found file paths from this list.

*Notes:*  

This will not yield **all** files on the system that match the filter.  

Only files where your application has access to their respective directory are found this way.  

For example the Windows directory and user directories of other users are usually protected. (assuming you run on Windows)

Keep in mind, that some files might be protected independently of their directory.  

So when trying to read them, also consider the fact, that the read might fail.  

Just encompass the read with a try catch.
Regarding the error "denied access to path (...)", sometimes you have to run Visual Studio as an a administrator in order to access some folders in the C:\ drive.