[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"howto:cs:android:en":3},{"resolvedFromAlias":4,"canonicalExt":5,"ext":5,"name":6,"category":7,"categoryName":8,"updatedAt":9,"os":10,"osLabel":11,"quickSolution":12,"stepByStep":13,"recommendedSoftware":15,"alternativeMethods":16,"commonIssues":17,"securityNote":36,"extensionPath":37,"extensionLabel":38,"breadcrumbs":39,"metaDescription":49},false,"cs","C# source code file","code","Code","2026-06-12T09:03:13.752Z","android","Android","To open .CS files on Android, .cs files are source code; for full tooling and project builds, move the file to a desktop and open it in a code editor such as Visual Studio Code.",[14],".cs files are source code; for full tooling and project builds, move the file to a desktop and open it in a code editor such as Visual Studio Code.",[],[],[18,24,30],{"title":19,"description":20,"steps":21},"Double-clicking opens the wrong app (or shows as an unknown type)","If file associations are misconfigured, your system may open .cs in an unsuitable program or not know what it is. On Linux, correct identification typically comes from the shared-mime-info mapping (*.cs → text/x-csharp).",[22,23],"Use “Open with…” and pick a code editor (such as Visual Studio Code).","If you’re on Linux and file type detection seems wrong, check that your system’s shared-mime-info database is up to date and that the file still has the .cs extension.",{"title":25,"description":26,"steps":27},"VS Code prompts to install C# tooling when opening the file","Visual Studio Code can detect C# files and may prompt you to install C# support to provide features like IntelliSense and debugging.",[28,29],"Follow the prompt in VS Code to install the recommended C# tooling for C# development.","Reopen the folder/project containing the .cs file so VS Code can load the C# features correctly.",{"title":31,"description":32,"steps":33},"Code examples don’t run by just opening the .cs file","A .cs file is source code; it typically needs to be compiled/run within a proper C# workflow rather than “opened” like a document.",[34,35],"Use a C# tutorial workflow that creates and runs file-based programs (for example, create a file like AsciiArt.cs and run it as instructed).","Ensure the file is part of the intended program context (for example, the correct folder/project) before trying to execute it.",".cs files are plain text, but they can contain code that performs harmful actions if you compile and run it; treat untrusted .cs files like any other untrusted source code.","/file-extension/cs",".CS",[40,43,46],{"label":41,"to":42},"Home","/",{"label":44,"to":45},"How To","/file-extension",{"label":47,"to":48},"Open .CS on Android","/how-to/open-cs-on-android","Learn how to open .CS files on Android with step-by-step instructions, recommended software, and troubleshooting tips."]