Questions tagged [dynamic-binding]

Dynamic binding (aka dynamic dispatch) is the process of mapping a message to a specific piece of code (method) at runtime.

257 questions
10
votes
5 answers

How do I use a common log4net reference in assemblies loaded at runtime?

I have a single-threaded application that loads several assemblies at runtime using the following: objDLL = Assembly.LoadFrom(strDLLs[i]); I would like the assemblies loaded in this manner to use the same log4net.ILog reference as the rest of the…
Backpacker
10
votes
3 answers

Dynamic Binding in C#

class A { public virtual void WhoAreYou() { Console.WriteLine("I am an A"); } } class B : A { public override void WhoAreYou() { Console.WriteLine("I am a B"); } } class C : B { public new virtual void WhoAreYou() { Console.WriteLine("I am…
C-va
  • 2,910
  • 4
  • 27
  • 42
8
votes
2 answers

interface paradigm performance (dynamic binding vs. generic programming)

While at their core dynamic binding and templates are fundamentally different things, they can be used to implement the same functionality. Code example (only for reference) A) dynamic binding namespace DB { // interface class CustomCode { …
bitmask
  • 32,434
  • 14
  • 99
  • 159
8
votes
2 answers

Difference between with-local-vars and with-bindings in Clojure

The documentation for Clojure with-local-vars and with-bindings doesn't suffice for me to distinguish the two. Any hints?
Reb.Cabin
  • 5,426
  • 3
  • 35
  • 64
8
votes
4 answers

static member functions inheritance

I am new to C++ programming, i have a got doubt while doing some C++ programs, that is how to achieve dynamic binding for static member function. dynamic binding of normal member functions can be achieved by declaring member functions as virtual but…
nagaradderKantesh
  • 1,672
  • 4
  • 18
  • 30
7
votes
2 answers

DLR return type

I need some DLR help. I am implementing an IDynamicMetaObjectProvider and DynamicMetaObject but I am having some issues getting the expected return type. I am overiding BindInvokeMember in the metaobject, I can see all the args types but no return…
AbdElRaheim
  • 1,384
  • 6
  • 8
7
votes
2 answers

How to avoid Converters clashing with multibinding in WPF code behind

I am creating WPF elements dynamically in code behind, and for each of the rows in the Grid I'm building it consists of a CheckBox and a Dynamic number of TextBoxes. The interaction that is needed is the following: If all TextBoxes in a row have a…
Saggio
  • 2,212
  • 6
  • 33
  • 50
6
votes
2 answers

implement dynamically datasource in spring data jpa

I have N Servers, N DBs and N configuration. see the scenario below So, on every request , I need to access server and db based on configuration. How can implement dynamically data source in spring data jpa?
Shahid Ghafoor
  • 2,991
  • 17
  • 68
  • 123
6
votes
2 answers

case: static binding? dynamic binding?

I know that overloading uses static binding and overriding uses dynamic binding. But what if they are mixed? According to this tutorial, to resolve method calls, static binding uses type information while dynamic binding uses actual Object…
6
votes
3 answers

Dynamic binding seems like a lie

Objective-C uses dynamic binding: that is method calls are resolved at runtime. Fine. And use of dot notation really boils down to a method call But, why then, can't I do something like this: #import int main (int…
bobobobo
  • 64,917
  • 62
  • 258
  • 363
5
votes
4 answers

Invoking virtual function and pure-virtual function from a constructor

When i invoke a virtual function from a base constructor, the compiler does not give any error. But when i invoke a pure-virtual function from the base class constructor, it gives compilation error. Consider the sample program below: #include…
5
votes
5 answers

Dynamic Binding in C++

I need some clarification on dynamic binding in C++ .I'm confused about the following: In C you can have an array of function pointers & assign different functions of the same signature & call them based on the index; is this Dynamic binding? In…
Arjun
  • 3,097
  • 4
  • 18
  • 5
5
votes
2 answers

Multi level Nested TreeView with Dynamic Binding in WPF

I am trying to create an application in which i require to display employees and their departments in the treeview kind of structure as below : Employee1 Department Dept1 Dept2 Employee2 Department Dept3 Dept4 how could i do this with WPF…
saloni
  • 51
  • 1
  • 2
5
votes
4 answers

Why is it called "method hiding"?

From the docs, "If a subclass defines a static method with the same signature as a static method in the superclass, then the method in the subclass hides the one in the superclass." I understand the difference between method hiding and overriding.…
rb612
  • 5,280
  • 3
  • 30
  • 68
5
votes
2 answers

In C++ how can we call private function through an object without using friend function?

I came across this code written in C++ : #include using namespace std; class Base { public: virtual int fun(int i) { cout << "Base::fun(int i) called"; } }; class Derived: public Base { private: int fun(int x) { cout <<…
h4ck3d
  • 6,134
  • 15
  • 51
  • 74
1
2
3
17 18