Posts Tagged where

C++ For C# Developers: Part 29 – Template Constraints

Tags: , ,

C# where constraints enable our generics to do a lot more. C++ also has constraints and they enable us to write more expressive and efficient code. Today we’ll see how to add some constraints to our templates to achieve these goals.

Read the rest of this article »

No Comments

IL2CPP Output for C# 7.3: Everything Else

Tags: , , , , ,

Today we conclude the series by looking at all the remaining features in C# 7.3 that we get access to in Unity 2018.3. Read on to learn about new kinds of structs, in parameters, new where constraints, discards, default literals, generalized async returns, and new preprocessor symbols!

Read the rest of this article »

3 Comments

Basic LINQ Performance

Tags: , , ,

SQL-style LINQ queries are a concise, readable way of performing various tasks dealing with all kinds of collections. Surely all that convenience comes with a performance cost to it. How bad do you think it is? Today we’ll look at the cost of some basic LINQ queries (Where, Select) versus the equivalent non-LINQ code. We’ll also see how much slower both of them are compared to manually-written, traditional code that does away with all the flexibility. Read on to see the results!

Read the rest of this article »

2 Comments