Questions about the abilities of C#

Started by Ryex, August 06, 2010, 08:51:55 pm

Previous topic - Next topic

Ryex

August 06, 2010, 08:51:55 pm Last Edit: August 06, 2010, 10:34:20 pm by Ryexander
1)  lets say I have loaded a c# dll that defines a namespace a class and a function. then i load another c#dll that defines the same namespace class and function. if i then call that function which version will be run the one most recently loaded or the one first loaded.

2) is there a way to do something similar to ruby aliasing in c#? ie. define a function then rename that function so that it can be redefined and call the old function inside the new definition.

3) if I were to develop an application in xna which version of c# is best 2.0 3.0 or 4.0? answer xna only works in 3.5
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

G_G

Well I think xna only runs on 3.0

As the latest versions of xna are 3.0 and 3.1

Ryex

thanks for that G_G it turns out that xna only runs on .net 3.5
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

winkio

you cant load two dlls with the same namespace, as far as I remember.  Or maybe you can, it's just horrible practice.

Also, there is no reason to alias code, if you are building your own libraries.  Aliasing is only useful for re-written classes, in which case, it is usually better to just rebuild the whole class, and not just parts of it.  However, whenever you use inheritance, you can always call the method as it is defined in the superclass using super.

Ryex

I was thinking of creating a plugin system so that latter down the line some one could write a dll and the app could load it and there would be no compatibility issues (or as few as there are between properly aliased  rgss scripts)
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Blizzard

You have to create an interface for it that all plugins need to satisfy. Remember how I made extensions work in RMX-OS? This is one way of doing things. Best is you look up how to make plugins in C#. That's the best way I can think of.

As for aliasing, C# is not a scripting language so that won't work whether you want it or not.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.