[Solved] Is the c# a functional or object oriented language?


From wikipedia:

C# is a multi-paradigm programming language encompassing strong typing, imperative, declarative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines

So, in general, we can just use whichever paradigm suits our needs for the task at hand.

UPDATE:
A couple of caveats have been highlighted by the comments below:

  • It is primarly intended to be “a simple, modern, general-purpose, object-oriented programming language” which means that the functional paradigm plays second fiddle to the object oriented one.
  • As a result some concepts considered important for functional programming are missing such as tail recursion
  • We can also change a mutable state via too many avenues to guarantee functional programming without side-effects. We therefore ought to excercise a little caution when using a functional paradigm not to alter state (for example by ensuring we are not changing an object in a LINQ Select statement)

5

solved Is the c# a functional or object oriented language?