2
votes
3answers
113 views

Can I pass an object by reference

I am trying to pass an object from an xna game into a method in an xna game library I'm writing. The object could be basically any type, both reference and value types. The game library is for debug ...
0
votes
2answers
34 views

Set value of a Nested field in reflection

in my application that uses reflection i have two classes public class FirstClass { public string someVar; public SecondClass second; public FirstClass() { second = new ...
0
votes
2answers
38 views

Reflection Initialize Property Values of an object Instance Using

I have an Object instance. In the Object's Constructor, I would like to allow user to pass in a Dictionary with which to initialize, some, if not all of the properties of the object. Now, instead of ...
0
votes
1answer
30 views

How to find out the private/public classes, properties, and methods being loaded/executed with C# during runtime

I am trying to use reflection to use a Proxy with WebView for Windows 8 Store App. The problem is, I am unable to find out if WebView has a private method or private property that is used for the ...
1
vote
0answers
20 views

Create custom AppDomain and add assemblies to it

How can I create an appdomain, add assemblies to it, then destroy that app domain? This is what I have tried: static void Main(string[] args) { string pathToExe = ...
0
votes
1answer
29 views

Cannot get types by custom attributes across assemblies

i am attempting to create a basic widget plugin system within my app and i am currently at a sticking point where built in widgets that use my WidgetAttribute attribute class (compiled into the exe) ...
0
votes
1answer
33 views

Is it possible to include only required properties in context?

I have Extension for my EF context to inlcude all the Properties of MissionEntity that have RequiredAttribute: public static IQueryable<Mission> MissionWithRequired(this IDbContext context) { ...
1
vote
2answers
81 views

How to assign C# dynamic variable properties to another dynamic object?

I'm trying to write a function which creates an object of Type t and assign its properties. internal static object CreateInstanceWithParam(Type t, dynamic d) { //dynamic obj = ...
2
votes
1answer
42 views

Possible to compile-time check constructor parameters for generic factory function?

I am experimenting with some factory type code where the BuildIt function returns a concrete type based solely on the generic type passed in. The generic type is restricted to being descendants of ...
0
votes
0answers
12 views

Dynamic Assembly Loading within the context of a Visual Studio Add-in?

So I'm creating a Visual Studio add-in that will load and execute code from dynamically-loaded assemblies. Our tools are modified often enough that I think requiring developers to close visual studio ...
1
vote
1answer
35 views

Universal property path retriever for indexed/non-indexed properties

The aim is to write an universal property path retriever for indexed/non-indexed properties. For indexing, only numerical indices have to be considered. I have the following code. This supposed to ...
2
votes
3answers
101 views

C# - GetValue - Object Does Not Match Target Type

I am trying to write a generic method to compare two objects (I purposefully have two different types coming in. The second one has the same properties as the first one. The first just has more.). I ...
2
votes
3answers
54 views

Overriding method in DLL using reflection

I am not even sure if this is possible so apologies if not. I have googled quite extensively and not found what I am looking for. Basically we have an application produced by a third party, which, ...
2
votes
2answers
45 views

Risks of loading Assemblies via reflection

This is a followup from my previous question, I want to examine the StrongName of an assembly before loading it (either via a file on the hard disk or via the byte data). To ensure that it's been ...
1
vote
2answers
52 views

Getting the properties of a parameter object

Hi I am just learning reflection and I am attempting to read the the parameters on the actions in controllers that are decorated with the attribute T4ValidateAttribute. Lets take an example: public ...

1 2 3 4 5 305
15 30 50 per page