C sharp

limbaj de programare
(Redirecționat de la C Sharp (limbaj de programare))

C#
C♯
Extensii fișiere.cs
ParadigmăMultiparadigmă: structurat, imperativ, obiect-orientat, event-driven, funcțional, generic, reflectiv, concurent
Apărut în2000; acum 24 ani (2000)
Proiectat deMicrosoft
DezvoltatorMicrosoft
Ultima versiune12.0[1]  Modificați la Wikidata
Tiparenominative typing[*][[nominative typing (major class of type system, in which compatibility and equivalence of data types is determined by explicit declarations and/or the name of the types)|​]]
inference typing[*][[inference typing (automatic detection of the data type of an expression in a programming language)|​]]
dynamic typing[*][[dynamic typing (type system paradigm in which objects' types are enforced at runtime)|​]]  Modificați la Wikidata
Implementări majoreVisual C#, .NET Framework, Mono, DotGNU
Dialecte, Spec#, Polyphonic C#
Influențat deC++,[2] Eiffel, Java,[2] Modula-3, Object Pascal,[3] ML, Icon, Haskell, , F#[note 1]
InfluențeD, Dart,[4] F#, Java,[5] Kotlin, Monkey, Nemerle, Swift,[6] Vala
PlatformăCommon Language Infrastructure
Sistem de operareMultiplatformă
LicențăCLR este proprietar, Mono este dual GPLv3, MIT/X11 și bibliotecile sunt LGPLv2, DotGNU este dual GPL și LGPLv2
Wikibooks logo C Sharp Programming la Wikibooks

C# este un limbaj de programare orientat-obiect conceput de Microsoft la sfârșitul anilor 90. A fost conceput ca un concurent pentru limbajul Java. Ca și acesta, C# este un derivat al limbajului de programare C++.

C# și programarea modificare

C# simplifică mult scrierea de programe pentru sistemul de operare Windows, iOS, Android etc. Este un limbaj de programare cross-platform.

Exemplu de program simplu Windows scris în Managed C++ ( C++/CLI) și C#:

Cod scris în Managed C++ ( C++/CLI):

public:
int main(array<System::String ^> ^args)
{
	// Activarea efectelor vizuale Windows XP înainte de crearea oricărui control
	Application::EnableVisualStyles();
	Application::SetCompatibleTextRenderingDefault(false); 

	// Crearea și rularea ferestrei principale
	Application::Run(gcnew Form1());
	return 0;
}

Cod scris în C#:

public static void Main()
{

       Form1 form1 = new Form1();
       form1.Show();
       Application.Run(form1);
}

Note modificare

  1. ^ for async

Referințe modificare

  1. ^ Announcing C# 12 (în engleză), accesat în  
  2. ^ a b Naugler, David (mai 2007). „C# 2.0 for C++ and Java programmer: conference workshop”. Journal of Computing Sciences in Colleges. 22 (5). Although C# has been strongly influenced by Java it has also been strongly influenced by C++ and is best viewed as a descendant of both C++ and Java. 
  3. ^ Hamilton, Naomi (). „The A-Z of Programming Languages: C#”. Computerworld. Arhivat din original la . Accesat în . We all stand on the shoulders of giants here and every language builds on what went before it so we owe a lot to C, C++, Java, Delphi, all of these other things that came before us. (Anders Hejlsberg) 
  4. ^ „Web Languages and VMs: Fast Code is Always in Fashion. (V8, Dart) - Google I/O 2013”. Google. Accesat în . 
  5. ^ Cornelius, Barry (). „Java 5 catches up with C#”. University of Oxford Computing Services. Accesat în . In my opinion, it is C# that has caused these radical changes to the Java language. (Barry Cornelius) 
  6. ^ Lattner, Chris (). „Chris Lattner's Homepage”. Chris Lattner. Accesat în . The Swift language is the product of tireless effort from a team of language experts, documentation gurus, compiler optimization ninjas, and an incredibly important internal dogfooding group who provided feedback to help refine and battle-test ideas. Of course, it also greatly benefited from the experiences hard-won by many other languages in the field, drawing ideas from Objective-C, Rust, Haskell, Ruby, Python, C#, CLU, and far too many others to list. 

Legături externe modificare

Vezi și modificare