C# Application Types for Java Developers
C# application types include Windows Console applications, Windows Forms applications, ASP.NET Web applications, ASP.NET Web Service applications, Smart Device applications, ActiveX applications, and setup and deployment applications.
Console Applications
Console applications use standard command-line input and output for input and output rather than a form. Console applications use the System.IO class for handling input and output. You can use the class name in front of methods, such as System.IO.Console.WriteLine()
, or include a using statement at the start of your program. Console applications are easy to create using Visual Studio and other development environments including any text editor, such as Microsoft® Notepad. For more information, see Introducing Visual Studio, Creating Console Applications (Visual C#), Hello World -- Your First Program (C# Programming Guide), or Main() and Command Line Arguments (C# Programming Guide).
Forms Applications
Forms applications use standard command line input and output for input and output rather than a form. Console applications use the System.Windows.Forms namespace and classes
for handling input and output. You can use the class name in front of methods such as using System.Windows.Forms;
or include a using statement at the start of your program. Forms applications are easy to create using Visual Studio and other development environments including any text editor, such as Microsoft® Notepad. For more information on creating a Windows application, see How to: Create a Windows Application Project, Creating ASP.NET Web Applications (Visual C#), or Creating ASP.NET Web Applications (Visual C#).
ASP.NET Web Applications
ASP.NET applications are Web applications displayed in a Web browser, rather than on a console or in a forms application. ASP.NET applications use the System.Web namespace and classes such as System.Web.UI for handling input and output to and from the browser. You can use the class name in front of methods such as using System.Web.UI.HtmlControls;
or include a using statement at the start of your program. ASP.NET applications are easy to create using Visual Studio and other development environments including any text editor, such as Microsoft® Notepad. For more information on creating a ASP.NET application, see Visual Web Developer. For more information on creating ASP.NET applications using Visual Studio .NET, see Overview of ASP.NET Applications on Application Diagrams. For more information on the ASP.NET, see ASP.NET Web Applications in the .NET Framework. For more information on how to debug an ASP.NET application, see Debugging ASP.NET Web Applications and Debugging Preparation: ASP.NET Web Applications.
ASP.NET Web Service Application
ASP.NET Web services are accessible using URLs, HTTP, and XML so that programs running on any platform and in any language can access ASP.NET Web services. ASP.NET Web service applications can be displayed on a console in a form, or in a Web browser or a smart device. ASP.NET Web services applications use the System.Web and System.Web.Services namespace and classes. ASP.NET applications Web services are easy to create using Visual Studio and other development environments including any text editor, such as Microsoft® Notepad. For more information on creating a Web services application, see Accessing and Displaying Data (Visual C#) and How to: Create ASP.NET Web Service Projects. For more information on adding ASP.NET Web Services to an existing project, see How to: Add an XML Web Service to an Existing Web Project in Managed Code. For more information on the ASP.NET Web services, see Walkthrough: Creating and Using an ASP.NET Web Service in Visual Web Developer and Walkthrough: Creating an XML Web Service Using Visual Basic or Visual C#. For more information on how to debug an ASP.NET Web services application, see Debugging Preparation: XML Web Service Projects.
Other topics related to ASP.NET Web services include:
Walkthrough: Creating an XML Web Service Using Visual Basic or Visual C#
Walkthrough: Creating and Using an ASP.NET Web Service in Visual Web Developer
How to use Use Visual Studio .NET 2003 to build and test an XML Web service
Smart Device Applications
Smart device applications run on mobile devices, such as PDAs and Smartphones. Smart device applications can be console applications, Windows Forms applications, or ASP.NET and Web clients and are displayed on a console, in a form, or in a Web browser. Smart device applications use the same namespaces and classes as the desktop applications. However they use the Compact Framework rather than .NET Framework. For more information on developing on a Windows mobile device versus developing for the desktop, see Developing Device vs. Desktop Applications. Some versions of the development environment may support development for some or all of the C# application types on the mobile device. For more information on creating a ASP.NET application, see How to create a Sm and Smart Device Application Wizard.
Other topics related to ASP.NET Web services include:
Use Visual Studio .NET 2003 to build and test a mobile Web application
Walkthrough: Creating Windows Forms Applications for a Device
ActiveX Controls
Similar to Java Beans, an ActiveX control is a component and equivalent to an "OLE Object" and Component Object Model (COM) Object. An ActiveX control, in the very simplest form, is a COM object that supports the IUnknown interface. ActiveX Controls are the primary architecture for developing programmable software components for reuse in a variety of different containers, ranging from Internet Explorer to software development tools, and end-user productivity tools. For more information on ActiveX Controls, see:
Setup and Deployment Applications
Visual Studio provides templates for deployment desktop, Web, and smart device setup and deployment projects. Different versions of the development environment may support setup and deployment for some or all of the C# application types on the desktop, on the Web, and for mobile devices. For more information, see:
Walkthrough: Generating Custom CAB files for Device projects
Cabinet Packaging : Internet Explorer Code Download and the Java Package Manager
Related Topics
See Also
Concepts
Other Resources
Migrating to Visual C#
C# Code Examples for Java Developers
The C# Programming Language for Java Developers
Getting Started with Visual C#
Using the Visual C# IDE