Click here to Skip to main content
15,921,959 members
Home / Discussions / C#
   

C#

 
GeneralRe: I want to romove all input tag from html Pin
Qasim198419-Feb-10 3:32
professionalQasim198419-Feb-10 3:32 
GeneralRe: I want to romove all input tag from html Pin
Not Active19-Feb-10 3:38
mentorNot Active19-Feb-10 3:38 
GeneralRe: I want to romove all input tag from html Pin
Dave Kreskowiak19-Feb-10 3:39
mveDave Kreskowiak19-Feb-10 3:39 
GeneralRe: I want to romove all input tag from html Pin
Qasim198419-Feb-10 3:43
professionalQasim198419-Feb-10 3:43 
Questionhi Pin
rose251819-Feb-10 1:55
rose251819-Feb-10 1:55 
AnswerRe: hi Pin
Pete O'Hanlon19-Feb-10 2:33
mvePete O'Hanlon19-Feb-10 2:33 
AnswerRe: hi Pin
Dave Kreskowiak19-Feb-10 3:35
mveDave Kreskowiak19-Feb-10 3:35 
Question[SOLVED] IL: What are the contents of arg_0 in a static method? [modified] Pin
blackblizzard19-Feb-10 1:42
blackblizzard19-Feb-10 1:42 
AnswerRe: IL: What are the contents of arg_0 in a static method? Pin
blackblizzard19-Feb-10 1:49
blackblizzard19-Feb-10 1:49 
QuestionDrag&Drop to Windows Explorer ? Pin
Nematjon Rahmanov19-Feb-10 1:06
Nematjon Rahmanov19-Feb-10 1:06 
QuestionGet Client Browser Time on server side Pin
sher_azam19-Feb-10 0:45
sher_azam19-Feb-10 0:45 
AnswerRe: Get Client Browser Time on server side Pin
J4amieC19-Feb-10 0:57
J4amieC19-Feb-10 0:57 
GeneralRe: Get Client Browser Time on server side Pin
sher_azam19-Feb-10 1:04
sher_azam19-Feb-10 1:04 
GeneralRe: Get Client Browser Time on server side Pin
J4amieC19-Feb-10 1:09
J4amieC19-Feb-10 1:09 
QuestionRegular expression [modified] Pin
Eduard Keilholz19-Feb-10 0:08
Eduard Keilholz19-Feb-10 0:08 
AnswerRe: Regular expression Pin
Not Active19-Feb-10 0:37
mentorNot Active19-Feb-10 0:37 
GeneralRe: Regular expression Pin
Eduard Keilholz19-Feb-10 2:27
Eduard Keilholz19-Feb-10 2:27 
AnswerRe: Regular expression Pin
rhuiden19-Feb-10 2:33
rhuiden19-Feb-10 2:33 
GeneralRe: Regular expression Pin
Eduard Keilholz19-Feb-10 3:47
Eduard Keilholz19-Feb-10 3:47 
Question[SOLVED] How do I get the type of the class I'm in without knowing its name? [modified] Pin
blackblizzard18-Feb-10 23:44
blackblizzard18-Feb-10 23:44 
AnswerRe: How do I get the type of the class I'm in without knowing its name? Pin
Abhinav S19-Feb-10 0:47
Abhinav S19-Feb-10 0:47 
GeneralRe: How do I get the type of the class I'm in without knowing its name? Pin
blackblizzard19-Feb-10 1:03
blackblizzard19-Feb-10 1:03 
No, sorry, the problem is I'm emitting the code with Reflection.Emit, so I can't just type "MyClass".
It works like this:
* Someone calls my class ObjectFactory with a Type they want me to extend, say "MyType".
* Using reflection, I create a subclass of MyType, called EXT_MyType, which has some extra fields and methods. I want to add a static initializer to EXT_MyType, which should look like this:

static EXT_MyType() {
    someMethod(typeof(EXT_MyType));
}


But the problem is when I emit the code for this static initializer I haven't yet created the type EXT_MyType (that's what I'm doing, I'm creating its static initializer, etc), so I don't know how to emit this code. See, I'm trying to emit it like this:

ilGenerator.Emit(OpCodes.Ldtoken, typeof(EXT_MyType));
ilGenerator.Emit(OpCodes.Call, typeof(EXT_MyType).GetMethod("someMethod"));


but EXT_MyType doesn't exist yet. So I'm wondering whether there's a primitive or something I can invoke from within the static initializer that will allow me to do this instead:

static EXT_MyType() {
    someMethod(getTypeOfThisClass());
}


Where getTypeOfThisClass() would be that "primitive or something...". Since this call would take place once I've created EXT_MyType there wouldn't be a problem. I just don't know whether a primitive like that exists.

If it doesn't, I'd appreciate suggestions on alternative ways of doing this.
Thanks!
GeneralRe: How do I get the type of the class I'm in without knowing its name? Pin
Daniel Grunwald19-Feb-10 2:22
Daniel Grunwald19-Feb-10 2:22 
GeneralRe: How do I get the type of the class I'm in without knowing its name? Pin
blackblizzard19-Feb-10 2:35
blackblizzard19-Feb-10 2:35 
QuestionSql Connection Pin
Isaac Gordon18-Feb-10 23:29
Isaac Gordon18-Feb-10 23:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.