concept int in category c#

This is an excerpt from Manning's book C# in Depth, Fourth Edition.
This is exactly the same method call in terms of the IL the compiler will generate. But you haven’t had to specify the type argument of int; the compiler inferred that for you. It did that based on your argument for the first parameter in the method. You’re using an argument of type List<int> as the value for a parameter of type List<T>, so T has to be int.
If you add a ? to the end of the name of a non-nullable value type, that’s precisely equivalent to using Nullable<T> for the same type. It works for the keyword shortcuts for the simple types (int, double, and so forth) as well as full type names. For example, these four declarations are precisely equivalent:
static void PrintValueAsInt32(object o) { int? nullable = o as int?; Console.WriteLine(nullable.HasValue ? nullable.Value.ToString() : "null"); } ... PrintValueAsInt32(5); #1 PrintValueAsInt32("some string"); #2

This is an excerpt from Manning's book Functional Programming in C#: How to write better C# code.
// initial implementation public void Log(LogMessage msg) { using (var conn = new SqlConnection(connString)) { int affectedRows = conn.Execute("sp_create_log" , msg, commandType: CommandType.StoredProcedure); } } // refactored implementation public void Log(LogMessage message) => Connect(connString, c => c.Execute("sp_create_log" , message, commandType: CommandType.StoredProcedure));
As you can see, a Comparison<T> delegate can be given two T’s and will yield an int indicating which is greater.
The arrow notation for expressing function signatures is very similar to notation used in languages like Haskell and F#.[1] Let’s say we have a function f from int to string; that is, it takes an int as input and yields a string as output. We’ll notate the signature like this:
A parser function with the signature string → int is partial, and it’s not clear from the signature what will happen if you supply a string that can’t be converted to an int. On the other hand, a parser function with signature string → Option<int> is total, because for any given string it will return a valid Option<int>.

This is an excerpt from Manning's book C# in Depth.
Each supplier has a Name (string) and a SupplierID (int). I’ve also added SupplierID as a property in Product and adapted the sample data appropriately. Admittedly that’s not a very object-oriented way of giving each product a supplier—it’s much closer to how the data would be represented in a database. It does make this particular feature easier to demonstrate for now, but you’ll see in chapter 12 that LINQ allows you to use a more natural model too.
I won’t go through what the code does or how it does it, because the result is exactly the same as in listing 4.2. The two listings compile down to the same IL—they simply use different syntax, just as int is interchangeable with System.Int32. You can use the shorthand version everywhere, including in method signatures, typeof expressions, casts, and the like.
public int Compare(Product first, Product second) { // Reverse comparison of popularity to sort descending int ret = second.Popularity.CompareTo(first.Popularity); if (ret != 0) { return ret; } ret = first.Price.CompareTo(second.Price); if (ret != 0) { return ret; } return first.Name.CompareTo(second.Name); }
The executive summary is that if there’s an operator or conversion available on a non-nullable value type, and that operator or conversion only involves other non-nullable value types, then the nullable value type also has the same operator or conversion available, usually converting the non-nullable value types into their nullable equivalents. To give a more concrete example, there’s an implicit conversion from int to long, and that means there’s also an implicit conversion from int? to long? that behaves in the obvious manner.

This is an excerpt from Manning's book Real-World Functional Programming with Examples in F# and C#.
According to these conditions, our GameCharacter class is immutable. All its fields are marked using the readonly modifier ❶. int is an immutable primitive type and Point is an immutable value type. When a field is read-only, it can be set only when creating the object, so we can set the health and location of the character only in the constructor ❷. This means we can’t modify the state of the object once it’s initialized. So, what can we do when an operation needs to modify the state of the game character?
As you can see by looking at the type signature, the function takes a single argument, which is a tuple of the form (int * int), and the return type is int. This corresponds to the C# lambda function written in this form:
Func<int, int, int> add = (a, b) => a + b
A term that you can sometimes hear when using the partial function application is currying. This refers to converting a function that takes multiple arguments (as a tuple) into a function that takes the first argument and returns a function taking the next argument, and so on. So, for example, the function of type int -> int -> int is a curried form of a function that has a type (int * int) -> int. Partial function application is then the use of a curried function without specifying all the arguments.