Results 1 to 5 of 5

Thread: What is form.cs?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2007
    Posts
    6

    What is form.cs?

    I try to write my first c# code in Visual Studio .Net Editor for Windows Application, and this page called form.cs is loaded by default.I create a new item called 'hi.cs', write my code there, but when I try compiling, I get an error.I'm doing something wrong?
    Not sure if this is the correct forum, if not, please guide me & thanks for any responses.

  2. #2

    Thread Starter
    New Member
    Join Date
    Jul 2007
    Posts
    6

    Re: What is form.cs?

    Erased the code from form.cs & wrote down my code..
    I guess this is the answer?

  3. #3
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: What is form.cs?

    Yes this is the correct forum for C# questions.

    ".cs" is the file extension for a C# class file.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  4. #4
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: What is form.cs?

    The Form1.cs file is the a windows Form created by the visual studio automatically. If you delete it then you'll have to go to the "program.cs" file and remove the lines related to the Form1 Class. you can just rename it and if using VS2005 it will automatically refactor other parts of your code to match the new name. other wise (VS 2002, 2003) you have to do it manually
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  5. #5
    Fanatic Member vijy's Avatar
    Join Date
    May 2007
    Location
    India
    Posts
    548

    Re: What is form.cs?

    Its an default file generated by VS.
    Extension of C#
    C Sharp-cs
    in solution explorer change the start up as hi.cs, it might shoot the error

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width