În lumea de astăzi, C sharp a avut un rol fundamental în viața noastră. De la apariția sa, a avut un impact semnificativ asupra diferitelor aspecte ale societății noastre, transformând modul în care comunicăm, lucrăm, relaționăm și chiar ne distram. C sharp a fost subiect de dezbateri, controverse și admirație, generând opinii contradictorii care reflectă importanța și influența sa asupra vieții noastre de zi cu zi. În acest articol, vom explora diferite aspecte legate de C sharp, analizând impactul și relevanța acestuia în lumea contemporană.
| C# | |
| C♯ | |
| Extensii fișiere | .cs |
|---|---|
| Paradigmă | Multiparadigmă: structurat, imperativ, obiect-orientat, event-driven, funcțional, generic, reflectiv, concurent |
| Apărut în | 2000 |
| Proiectat de | Microsoft |
| Dezvoltator | Microsoft |
| Ultima versiune | 14.0[1] |
| Tipare | nominative typing inference typing dynamic typing |
| Implementări majore | Visual C#, .NET Framework, Mono, DotGNU |
| Dialecte | Cω, Spec#, Polyphonic C# |
| Influențat de | C++,[2] Eiffel, Java,[2] Modula-3, Object Pascal,[3] ML, Icon, Haskell, Cω, F#[note 1] |
| Influențe | D, Dart,[4] F#, Java,[5] Kotlin, Monkey, Nemerle, Swift,[6] Vala |
| Platformă | Common Language Infrastructure |
| Sistem de operare | Multiplatformă |
| Licență | CLR este proprietar, Mono este dual GPLv3, MIT/X11 și bibliotecile sunt LGPLv2, DotGNU este dual GPL și LGPLv2 |
| Modifică date / text | |
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# 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);
}
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.
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)
In my opinion, it is C# that has caused these radical changes to the Java language. (Barry Cornelius)
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.