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

public-fields

a way in c++ to hide a specific function

April 11, 2024 by Tarik

If you want to selectively hide functions from B it does not make much sense to use public inheritance in the first place. Use private inheritance & selectively bring methods from B into the scope of A: struct B{ void method1(){}; void method2(){}; }; struct A : private B{ using B::method1; }; A a; a.method1(); … Read more

Categories c++ Tags c++, inheritance, private-members, public-fields, using Leave a comment

Why are public fields faster than properties?

August 17, 2023 by Tarik

Edit 2: I had another potential thought here: You mentioned that you are running on x64. I’ve tested this same issue on x86, and seen the same performance when using auto-properties vs. fields. However, if you look around on Connect and mailing list/forum posts, there are many references online to the fact that the x64 … Read more

Categories c# Tags c++, oop, properties, public-fields, struct 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