Click here to Skip to main content
15,903,012 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Come on guys Pin
Pete O'Hanlon19-Nov-07 10:09
mvePete O'Hanlon19-Nov-07 10:09 
GeneralRe: Come on guys Pin
Dave Kreskowiak19-Nov-07 10:10
mveDave Kreskowiak19-Nov-07 10:10 
QuestionWeb Service Pin
senthilsstil18-Nov-07 23:06
senthilsstil18-Nov-07 23:06 
AnswerRe: Web Service Pin
Pete O'Hanlon19-Nov-07 0:27
mvePete O'Hanlon19-Nov-07 0:27 
AnswerRe: Web Service Pin
Vasudevan Deepak Kumar19-Nov-07 18:19
Vasudevan Deepak Kumar19-Nov-07 18:19 
QuestionHow to make datgrid searchable in .net framewok 2.0 Pin
Rock Star.18-Nov-07 19:18
Rock Star.18-Nov-07 19:18 
AnswerRe: How to make datgrid searchable in .net framewok 2.0 Pin
Christian Graus19-Nov-07 9:48
protectorChristian Graus19-Nov-07 9:48 
QuestionPartial Specialization of Generics based on Generic Type Parameters? Pin
Philip Laureano18-Nov-07 12:34
Philip Laureano18-Nov-07 12:34 
Lately, I've been playing around with the idea of giving LinFu's
Simple.IOC container the ability to create different generic type
instances depending on the type parameters given to the generic type
at runtime, but I'm not quite sure how useful would it be.

Anyway, as an example, suppose that I have the following generic
interface:

{{
public interface IOperation<tresult, tparam1,="" tparam2="">
{
TResult DoSomething(TParam1 first, TParam2 second);

}
}}

...and for this example, I want the IOC container to use the following
class to implement IOperation<tresult> if the TResult type is a
numeric type:

{{
// Note : This is a hypothetical code sample; it won't compile if you
remove the comments!
public class SomeMathOperation // : IOperation<tresultt, param1,
tparam2=""> where TResult : IsNumeric()
{
// TResult DoSomething(TParam1 first, TParam2 second);

}
}
}}

Now, the biggest challenge here is that in addition to adding a
hypothetical generic type constraint, there is currently no language
available in .NET (not even IL) with any feature that allows you to
match an interface like IOperation<tresult, tparam1,="" tparam2=""> to a
single class implementation like SomeMathOperation without having to
specify all of the type parameters to instantiate the generic type.
Furthermore, it would be useful if (for example) I could specify an
alternative type to use in the event that the TResult type was a non-
numeric type:

{{
// Note: I don't want the compiler to evaluate TParam1 or TParam2 til
runtime; I want the type specialized
// to handle only *specific* TResult types
public class SomeStringOperation // : IOperation<tresult, tparam1,
tparam2=""> where TResult : IsString()
{

}
}}

For those of you who are familiar with Visual C++ and partial template
specialization, this concept should be immediately familiar.
Essentially, what I want to do here is generate an entire hierarchy of
classes at runtime depending on the type parameters passed to the
generic type definition. So my question is this--how useful would this
feature be if it were implemented with LinFu?
QuestionCan't search a dataset for number Pin
kermit8818-Nov-07 11:37
kermit8818-Nov-07 11:37 
GeneralRe: Can't search a dataset for number Pin
Paul Conrad19-Jan-08 12:22
professionalPaul Conrad19-Jan-08 12:22 
QuestionCalling IL assembler from code Pin
zawarq18-Nov-07 5:12
zawarq18-Nov-07 5:12 
AnswerRe: Calling IL assembler from code Pin
Luc Pattyn18-Nov-07 5:50
sitebuilderLuc Pattyn18-Nov-07 5:50 
AnswerRe: Calling IL assembler from code Pin
Mark Churchill21-Nov-07 14:09
Mark Churchill21-Nov-07 14:09 
Question.NET Remoting over WAN ? Pin
booink18-Nov-07 0:18
booink18-Nov-07 0:18 
AnswerRe: .NET Remoting over WAN ? Pin
DigiOz Multimedia18-Nov-07 5:53
DigiOz Multimedia18-Nov-07 5:53 
GeneralRe: .NET Remoting over WAN ? Pin
booink18-Nov-07 6:41
booink18-Nov-07 6:41 
GeneralRe: .NET Remoting over WAN ? Pin
DigiOz Multimedia18-Nov-07 8:03
DigiOz Multimedia18-Nov-07 8:03 
GeneralRe: .NET Remoting over WAN ? Pin
booink18-Nov-07 10:38
booink18-Nov-07 10:38 
GeneralRe: .NET Remoting over WAN ? Pin
DigiOz Multimedia18-Nov-07 10:47
DigiOz Multimedia18-Nov-07 10:47 
GeneralRe: .NET Remoting over WAN ? Pin
booink18-Nov-07 11:23
booink18-Nov-07 11:23 
GeneralRe: .NET Remoting over WAN ? Pin
DigiOz Multimedia19-Nov-07 9:18
DigiOz Multimedia19-Nov-07 9:18 
QuestionFarsi Numbers in LTR Mode Pin
DotNetWWW17-Nov-07 22:23
DotNetWWW17-Nov-07 22:23 
AnswerRe: Farsi Numbers in LTR Mode Pin
DigiOz Multimedia18-Nov-07 5:31
DigiOz Multimedia18-Nov-07 5:31 
Questionbar code scanner izzit possible? Pin
neodeaths17-Nov-07 11:09
neodeaths17-Nov-07 11:09 
AnswerRe: bar code scanner izzit possible? Pin
Christian Graus17-Nov-07 12:18
protectorChristian Graus17-Nov-07 12:18 

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.