×
Create a new article
Write your page title here:
We currently have 212 articles on Open Eggbert. Type your article name above or click on one of the titles below and start writing!



Open Eggbert
212Articles

C Sharp: Difference between revisions

No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 26: Line 26:


C# was published in 2010, 3 years before Speedy Blupi was released.
C# was published in 2010, 3 years before Speedy Blupi was released.
== C# decompilers ==
=== DnSpy ===
DnSpy is the unofficial revival of the well known .NET debugger and assembly editor,
Github: https://github.com/dnSpyEx/dnSpy
=== ILSpy ===
ILSpy is a .NET Decompiler with support for PDF generation.
Github: https://github.com/icsharpcode/ILSpy
=== Telerik JustDecompile ===
Telerik JustDecomp is a C# decompiler. Current status: retired and discontinued.
Website: https://www.telerik.com/products/decompiler.aspx


== C# books ==
== C# books ==


* '''"Programming C# 4.0" Iana Griffitha'''
* "Programming C# 4.0" Iana Griffitha
* '''"C# 4.0 in a Nutshell" Joseph Albahari and Bena Albahariho'''
* "C# 4.0 in a Nutshell" Joseph Albahari and Bena Albahariho
* '''"Pro C# 2010 and the .NET 4 Platform" Andrew Troelsen'''
* "Pro C# 2010 and the .NET 4 Platform" Andrew Troelsen
* '''"Essential C# 4.0" od Mark Michaels'''
* "Essential C# 4.0" od Mark Michaels
 
== .NET Compact Framework 4.0 ==
The '''.NET Compact Framework 4.0''' (CF) is a lightweight version of '''.NET Framework 4.0''', designed for resource-constrained devices like mobile phones and embedded systems (e.g., PDAs, Windows CE, and Windows Phone 7). It differs from the standard '''.NET Framework 4.0''' in several key ways:
 
=== 1. Supported Platforms and Target Devices: ===
 
* '''.NET Framework 4.0''' is intended for developing applications for full-featured desktop computers, servers, and applications running on Windows.
* '''.NET Compact Framework 4.0''' is targeted at devices with limited resources (e.g., limited processor power, small RAM, and storage capacity), such as mobile devices, embedded systems, and older versions of Windows Mobile and Windows CE.
 
=== 2. Size and Optimization: ===
 
* '''.NET Compact Framework''' is significantly smaller than '''.NET Framework'''. This is necessary for devices like mobile phones that have limited memory (RAM) and storage, so CF is optimized for such hardware.
* '''CF''' has a reduced set of libraries and features that aren't essential for mobile and embedded devices, meaning some components available in '''.NET Framework 4.0''' are not present in '''CF''' (e.g., advanced graphics classes or advanced networking).
 
=== 3. API and Feature Support: ===
 
* '''.NET Framework 4.0''' offers extensive support for modern desktop applications, including technologies like LINQ, Entity Framework, WPF, Windows Communication Foundation (WCF), and more.
* '''.NET Compact Framework 4.0''' has limited support for some features:
** '''WPF''' is not available.
** '''WCF''' is not fully supported (although basic web service support is present).
** '''ADO.NET''' and some advanced classes are present only in a limited form.
 
=== 4. Garbage Collection: ===
 
* The '''Garbage Collector''' in '''CF''' is designed for low memory consumption and optimization on small devices. This means it doesn't function the same way as in the '''.NET Framework''', which could impact the performance of applications.
 
=== 5. Libraries and Class Libraries: ===
 
* '''.NET Compact Framework 4.0''' includes only a subset of the standard .NET libraries. For instance, some advanced libraries for graphics or database work that are available in '''.NET Framework 4.0''' aren't included in '''CF'''.
* '''CF''' supports basic UI classes (Windows Forms, but without WPF), collections, threading, and basic networking.
 
=== 6. Performance and Optimization for Mobile Devices: ===
 
* '''.NET Compact Framework''' is designed to run efficiently on mobile devices with limited resources, such as lower processor power and smaller amounts of memory.
* It uses a different memory management model to minimize processor and memory demands, and is optimized for faster startup and operation on mobile devices.
 
=== 7. Portability: ===
 
* '''.NET Framework 4.0''' is intended for most desktop and server applications and is commonly used on Windows systems.
* '''.NET Compact Framework 4.0''' is for mobile and embedded devices and is not compatible with most desktop applications that run on the full version of .NET Framework.
 
=== 8. Development Tools: ===
 
* '''.NET Framework 4.0''' uses Visual Studio for developing desktop and web applications.
* '''.NET Compact Framework 4.0''' uses Visual Studio as well, but requires special projects and templates designed for mobile and embedded devices. Development typically takes place in '''Visual Studio 2010''' or older versions.
 
=== Main Differences: ===
 
* '''CF''' is a minimalist version of the .NET Framework, optimized for mobile and embedded devices with limited resources.
* The '''standard .NET Framework 4.0''' is a full-featured platform for developing desktop and server applications with broader features and support for modern technologies.

Latest revision as of 10:58, 18 April 2025

The correct title of this article is C#. The substitution of the # is due to technical restrictions.

What is C#

  • general-purpose high-level programming language supporting multiple paradigms.
  • very similar to Java programming language.
  • invented by Anders Hejlsberg, Scott Wiltamuth, and Peter Golde from Microsoft.
  • firstly distributed in 2000
  • official C# documentation: https://learn.microsoft.com/en-us/dotnet/csharp/

C# runtimes

.NET Framework (now discontinued) is the first runtime and compiler for C#. It is a closed-source and proprietary developed by Microsoft

Mono is free and open-source cross-platform compiler and runtime environment for C#. Mono project began in 2004.

.NET Core is the free and open-source runtime for C# developed by Microsoft and firstly published in 2016. The name .NET Core was later shortened to .NET.

C# web browser runtimes

bridge.net

cshtml5

Blazor (https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor)

Relation to Speedy Blupi for Windows Phone

Speedy Blupi for Windows Phone was written using the C# 4, although not all C# features were used.

C# was published in 2010, 3 years before Speedy Blupi was released.

C# decompilers

DnSpy

DnSpy is the unofficial revival of the well known .NET debugger and assembly editor, Github: https://github.com/dnSpyEx/dnSpy

ILSpy

ILSpy is a .NET Decompiler with support for PDF generation. Github: https://github.com/icsharpcode/ILSpy

Telerik JustDecompile

Telerik JustDecomp is a C# decompiler. Current status: retired and discontinued. Website: https://www.telerik.com/products/decompiler.aspx

C# books

  • "Programming C# 4.0" Iana Griffitha
  • "C# 4.0 in a Nutshell" Joseph Albahari and Bena Albahariho
  • "Pro C# 2010 and the .NET 4 Platform" Andrew Troelsen
  • "Essential C# 4.0" od Mark Michaels

.NET Compact Framework 4.0

The .NET Compact Framework 4.0 (CF) is a lightweight version of .NET Framework 4.0, designed for resource-constrained devices like mobile phones and embedded systems (e.g., PDAs, Windows CE, and Windows Phone 7). It differs from the standard .NET Framework 4.0 in several key ways:

1. Supported Platforms and Target Devices:

  • .NET Framework 4.0 is intended for developing applications for full-featured desktop computers, servers, and applications running on Windows.
  • .NET Compact Framework 4.0 is targeted at devices with limited resources (e.g., limited processor power, small RAM, and storage capacity), such as mobile devices, embedded systems, and older versions of Windows Mobile and Windows CE.

2. Size and Optimization:

  • .NET Compact Framework is significantly smaller than .NET Framework. This is necessary for devices like mobile phones that have limited memory (RAM) and storage, so CF is optimized for such hardware.
  • CF has a reduced set of libraries and features that aren't essential for mobile and embedded devices, meaning some components available in .NET Framework 4.0 are not present in CF (e.g., advanced graphics classes or advanced networking).

3. API and Feature Support:

  • .NET Framework 4.0 offers extensive support for modern desktop applications, including technologies like LINQ, Entity Framework, WPF, Windows Communication Foundation (WCF), and more.
  • .NET Compact Framework 4.0 has limited support for some features:
    • WPF is not available.
    • WCF is not fully supported (although basic web service support is present).
    • ADO.NET and some advanced classes are present only in a limited form.

4. Garbage Collection:

  • The Garbage Collector in CF is designed for low memory consumption and optimization on small devices. This means it doesn't function the same way as in the .NET Framework, which could impact the performance of applications.

5. Libraries and Class Libraries:

  • .NET Compact Framework 4.0 includes only a subset of the standard .NET libraries. For instance, some advanced libraries for graphics or database work that are available in .NET Framework 4.0 aren't included in CF.
  • CF supports basic UI classes (Windows Forms, but without WPF), collections, threading, and basic networking.

6. Performance and Optimization for Mobile Devices:

  • .NET Compact Framework is designed to run efficiently on mobile devices with limited resources, such as lower processor power and smaller amounts of memory.
  • It uses a different memory management model to minimize processor and memory demands, and is optimized for faster startup and operation on mobile devices.

7. Portability:

  • .NET Framework 4.0 is intended for most desktop and server applications and is commonly used on Windows systems.
  • .NET Compact Framework 4.0 is for mobile and embedded devices and is not compatible with most desktop applications that run on the full version of .NET Framework.

8. Development Tools:

  • .NET Framework 4.0 uses Visual Studio for developing desktop and web applications.
  • .NET Compact Framework 4.0 uses Visual Studio as well, but requires special projects and templates designed for mobile and embedded devices. Development typically takes place in Visual Studio 2010 or older versions.

Main Differences:

  • CF is a minimalist version of the .NET Framework, optimized for mobile and embedded devices with limited resources.
  • The standard .NET Framework 4.0 is a full-featured platform for developing desktop and server applications with broader features and support for modern technologies.