O'Reilly logo

Fluent C# by Rebecca M. Riordan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

6. C# Language, Part 2: Transitive Verbs

In the last chapter you saw how to create the nouns of C#, declared elements. In this chapter, we’ll look at one of the two kinds verbs: the EXPRESSIONS that are roughly (very roughly) equivalent to transitive verbs. (If it’s been awhile since you studied grammar, a transitive verb is one that takes both a subject and an object: “He bought the book.”)

Many people equate programming expressions to mathematical formulae. That’s not wrong, exactly, but expressions are a lot more than that. Of course you can say, “x = 1 + 1” in C#, and you’ll use an expression to say it, but you’ll also use expressions to say things like, “If Dumbo is an elephant, give him some peanuts” and, “Greedy wants the biggest apple ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required