Click here to Skip to main content
15,898,371 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# Program Output?? Pin
Pete O'Hanlon13-Oct-15 7:02
mvePete O'Hanlon13-Oct-15 7:02 
QuestionRe: C# Program Output?? PinPopular
Paul Conrad13-Oct-15 7:13
professionalPaul Conrad13-Oct-15 7:13 
AnswerRe: C# Program Output?? Pin
John Torjo19-Oct-15 22:09
professionalJohn Torjo19-Oct-15 22:09 
Questionc Pin
User 1202214013-Oct-15 5:12
User 1202214013-Oct-15 5:12 
QuestionRe: c# Pin
Paul Conrad13-Oct-15 5:19
professionalPaul Conrad13-Oct-15 5:19 
AnswerRe: c Pin
Richard MacCutchan13-Oct-15 7:56
mveRichard MacCutchan13-Oct-15 7:56 
Questionre-cast of Control back to its Native Type ? Pin
BillWoodruff13-Oct-15 0:48
professionalBillWoodruff13-Oct-15 0:48 
AnswerRe: re-cast of Control back to its Native Type ? Pin
Pete O'Hanlon13-Oct-15 1:14
mvePete O'Hanlon13-Oct-15 1:14 
One way I have seen this done, albeit in a hacky way, is to provide a Cast method that looks something like this:
C#
public T Cast<T>(object o)
{
  return (T)o;
}
Then, you call it with this:
C#
MethodInfo methodInfo = this.GetType().GetMethod("Cast").MakeGenericMethod(typ);
You can then choose to do with it, what you will.

modified 13-Oct-15 8:20am.

GeneralRe: re-cast of Control back to its Native Type ? Pin
BillWoodruff13-Oct-15 2:06
professionalBillWoodruff13-Oct-15 2:06 
GeneralRe: re-cast of Control back to its Native Type ? Pin
Pete O'Hanlon13-Oct-15 2:21
mvePete O'Hanlon13-Oct-15 2:21 
GeneralRe: re-cast of Control back to its Native Type ? Pin
BillWoodruff13-Oct-15 3:01
professionalBillWoodruff13-Oct-15 3:01 
AnswerRe: re-cast of Control back to its Native Type ? Pin
Eddy Vluggen13-Oct-15 1:42
professionalEddy Vluggen13-Oct-15 1:42 
GeneralRe: re-cast of Control back to its Native Type ? Pin
BillWoodruff13-Oct-15 2:18
professionalBillWoodruff13-Oct-15 2:18 
GeneralRe: re-cast of Control back to its Native Type ? Pin
Eddy Vluggen13-Oct-15 3:41
professionalEddy Vluggen13-Oct-15 3:41 
QuestionGet rows from database, Entity framework Pin
Member 1204569212-Oct-15 1:49
Member 1204569212-Oct-15 1:49 
AnswerRe: Get rows from database, Entity framework Pin
Dave Kreskowiak12-Oct-15 4:36
mveDave Kreskowiak12-Oct-15 4:36 
GeneralRe: Get rows from database, Entity framework Pin
Member 1204569212-Oct-15 4:48
Member 1204569212-Oct-15 4:48 
GeneralRe: Get rows from database, Entity framework Pin
Dave Kreskowiak12-Oct-15 4:50
mveDave Kreskowiak12-Oct-15 4:50 
GeneralRe: Get rows from database, Entity framework Pin
Member 1204569212-Oct-15 5:09
Member 1204569212-Oct-15 5:09 
GeneralRe: Get rows from database, Entity framework Pin
Dave Kreskowiak12-Oct-15 5:14
mveDave Kreskowiak12-Oct-15 5:14 
GeneralRe: Get rows from database, Entity framework Pin
Member 1204569212-Oct-15 9:35
Member 1204569212-Oct-15 9:35 
GeneralRe: Get rows from database, Entity framework Pin
Dave Kreskowiak12-Oct-15 9:54
mveDave Kreskowiak12-Oct-15 9:54 
GeneralRe: Get rows from database, Entity framework Pin
Member 1204569212-Oct-15 10:30
Member 1204569212-Oct-15 10:30 
GeneralRe: Get rows from database, Entity framework Pin
Dave Kreskowiak12-Oct-15 10:33
mveDave Kreskowiak12-Oct-15 10:33 
Questionhow to read data from gps (TK103) in .net Pin
Member 454542811-Oct-15 6:34
professionalMember 454542811-Oct-15 6:34 

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.