Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

reference-parameters

How do I use Reference Parameters in C++?

April 7, 2023 by Tarik

Think of a reference as an alias. When you invoke something on a reference, you’re really invoking it on the object to which the reference refers. int i; int& j = i; // j is an alias to i j = 5; // same as i = 5 When it comes to functions, consider: void … Read more

Categories c++ Tags c++, reference-parameters Leave a comment

C# property and ref parameter, why no sugar?

February 22, 2023 by Tarik

Because you’re passing the result of the indexer, which is really the result of a method call. There’s no guarantee that the indexer property also has a setter, and passing it by ref would lead to a false security on the developer’s part when he thinks that his property is going to be set without … Read more

Categories c# Tags c++, properties, reference-parameters, syntactic-sugar Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa