|
by: philipl |
last post by:
hi,
i am having a problem catching a user defined exception, defined in a
class A library on its own, thrown from another class B. I am trying
to catch it in a console app which invokes class B using the Activator
class like this:
instob = Activator.CreateInstance(type, args1);
The problem is that the try block in my console app treats it as an
|
by: 2G |
last post by:
Hi,
I'm having some problems creating an instance of the dataset I compile in
memory and I don't know why.
I what to do this to Invoke WriteXmlSchema or GetSchemaSerializable so I
could save the xsd of my dataset.
The compiling seems to succeed since cr.Errors.HasErrors returns false;
Anyone that knows what the problem could be?
|
by: hazz |
last post by:
this is a repost with more concise code (well, for me) and better questions
(I hope....) .
given the following two classes, my intent is to use either
Activator.CreateInstance or InvokeMember pass a token into the instantiated
class DBPassword and return a string;
**************************************
namespace DBPasswordProvider
public class DBPassword
{
|
by: System.Reflection Activator |
last post by:
**************************************
//Load the Assembly
Assembly a = Assembly.LoadFrom(sAssembly);
//Get Types so we can Identify the Interface.
Type mytypes = a.GetTypes();
BindingFlags flags = (BindingFlags.NonPublic | BindingFlags.Public |
BindingFlags.Static | BindingFlags.Instance | BindingFlags.DeclaredOnly);
//Iterate through the Assembly to find Class with a Public Interface.
|
by: Ian Frawley |
last post by:
Hi
I have used the Activator class a number of times in my Windows apps and
Windows Services and was thinking of using it again in one of my web
services that I have been developing. I have been told that this is a bad
idea as it will greatly affect the performance of my web service. So I have
been thinking about it and all my other apps use the Activator class to
instantiate objects that hang around for the uptime of the app on start...
|
|
by: Huw |
last post by:
I have written a small procedure that opens a dialog that
I pass it.
Sub MyOpen(txtForm as string)
Dim frm As Object
Dim frmType As Type
frmType = Type.GetType(txtForm)
frm = Activator.CreateInstance(frmType)
frmType.InvokeMember("ShowDialog",
|
by: Johnny R |
last post by:
Hello,
I'm loading a Class from Assemly DLL using Activator.CreateInstance.
That loaded Class is executed in a worker Thread with no loop.
What actually happends when class is loaded using Activator.CreateInstance?
If I create same class using Activator.CreateInstance many times will
there be multiple instances of that same class created by
Activator.CreateInstance?
|
by: Jon Skeet [C# MVP] |
last post by:
On Apr 11, 8:40 am, Andrew <And...@discussions.microsoft.comwrote:
Okay, that means you've either not given the full classname (including
namespace) or it's not in mscorlib or the currently executing
assembly, in which case you need to give assembly details as well.
The line with testType2 is explicitly trying to find a class called
"name". The string "name" and the variable called name are completely
independent things.
|
by: =?Utf-8?B?QW5kcmV3?= |
last post by:
Found it.
string name = Properties.Settings.Default.ClassName.ToString();
//"myproject.myclass, myassembly" format.
//name = "ABC.MyClass, Assem" ;
Type t = Type.GetType(name);
Object obj = Activator.CreateInstance(t);
string result = t.InvokeMember("methodName",
|
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: 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: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|