|
by: Antony |
last post by:
Hello - I am wanting to print out a "Yes" next to classes that
implement "Interface01", otherwise a "No". Here is my code. It crashes
with a null reference exception and I am not sure why. Ideas?
Thank you for you help.
Tony
Imports System.Reflection
Public Class Form1
|
by: Rlrcstr |
last post by:
If I have some code behind a form and I want to be able to pass an object to
it... any of several user defined classes that I have... and then display
the values in the member variables of the class, I'm guessing that I use
Reflection. I have never used anything like that before. Can someone point
me to a good example of doing this? I will basically be drawing a table on
the form with dta from the passed class in columns. The...
|
by: dj |
last post by:
I know seasoned OOP-savvy developers will roll their eyes at this one, but
can anyone provide a clear explanation as to *why* one would need to use an
Interface in a VB.NET application?
Every book and article I seem to run across jumps right into "and here's how
Interfaces are implemented..." followed by a block of meaningless (to me)
code without explaining why this is being used in the first place. e.g. Why
not use a Class object?
...
|
by: John F |
last post by:
Hello All,
I'm dynamically loading a form through reflection. I have this working.
What I'd like to do is implement an interface so that I can cast my instance
to that interface. I want to be able to call methods and pass parameters
normally in the dynamically loaded Form.
Yesterday Nicholas Paldino's suggested this. Btw, thanks Nick! As hard as
I tried without asking further questions, I need a little more help. :)
|
by: jm |
last post by:
I am having trouble understanding the purposes of an interface, even
though the concept of interfaces is around me all the time (user
interface, for example). I'm just not understanding software
interfaces.
Like anything else, it appears Interfaces are by design something that
requires documentation. I know this may be obvious, but if I have a
class A and I say, well, class A implements IMyInterface. The fact
that it implements...
|
|
by: RSH |
last post by:
I am trying really hard to grasp the concept of Interfaces and their real
world usage.
I constructed a simple project of a webpage that contains two controls. I
am enabling communication back and forth between the page as well as
controls. I used two interfaces to remove the hardcoded references.
Is what I'm doing correct? Any suggestions?
Thanks!
|
by: Random |
last post by:
How can I use reflection (or some other method) to find the type of an
object that has been passed in to my method under an interface definition?
I try to use GetType, but that won't work.
|
by: |
last post by:
I am having problems with casting or converting a class to to an interface
from which it derives. I'm certain that it's due to how it's being loaded,
but I'm not sure how to get past the problem.
Here's a general outline of the architecture. It's oversimplified, but I
think it's enough info to help:
Assembly A.dll
{
interface IMyBase {}
|
by: Big Daddy |
last post by:
I have an interface called PeriodicJob. In a DLL, I declare the
interface and then create a class that implements the interface. In a
different executable, I also declare the interface. I then load the
assembly with late binding and create an instance of the class with
reflection. I try to cast the object to the class type of the
interfact, but I get an invalid cast exception. It says that the
object I am creating isn't a PeriodicJob. ...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|