Click here to Skip to main content
15,888,313 members
Home / Discussions / C#
   

C#

 
QuestionRe: How to make a "dungeon"(kinda of a small labyrinth) using devc and matrix Pin
ZurdoDev31-Jan-20 10:48
professionalZurdoDev31-Jan-20 10:48 
QuestionFileSystemWatcher Question Pin
Kevin Marois28-Jan-20 6:07
professionalKevin Marois28-Jan-20 6:07 
AnswerRe: FileSystemWatcher Question Pin
Eddy Vluggen28-Jan-20 7:21
professionalEddy Vluggen28-Jan-20 7:21 
AnswerRe: FileSystemWatcher Question Pin
Gerry Schmitz28-Jan-20 7:57
mveGerry Schmitz28-Jan-20 7:57 
AnswerRe: FileSystemWatcher Question Pin
Luc Pattyn28-Jan-20 10:05
sitebuilderLuc Pattyn28-Jan-20 10:05 
GeneralRe: FileSystemWatcher Question Pin
Gerry Schmitz29-Jan-20 3:38
mveGerry Schmitz29-Jan-20 3:38 
AnswerRe: FileSystemWatcher Question Pin
Nathan Minier29-Jan-20 5:35
professionalNathan Minier29-Jan-20 5:35 
QuestionExpando object - creating a dynamic class and reading the property types in a unit test Pin
Simon_Whale27-Jan-20 9:45
Simon_Whale27-Jan-20 9:45 
C#
dynamic returnObject = new ExpandoObject() as IDictionary<string, object>;

// Other code actions here

var EnterData = (IDictionary<string, object>)returnObject

EnterData.Add("myColumn", typeof(int));


Now when I debug a test that I have created I can see the value type has been set to int.

but I would like to add a test to this, purely for my own learning

C#
var keypair = EnterData.FirstOrDefault(p=> p.Key == "myColumn");
var properties = keypair.GetType().GetGenericArguments();
var ValueType = properties[1];


which always returns a type object, is there a way to get the type that I have assigned to the keyvaluepair?
Every day, thousands of innocent plants are killed by vegetarians.

Help end the violence EAT BACON

QuestionRe: Expando object - creating a dynamic class and reading the property types in a unit test Pin
Eddy Vluggen27-Jan-20 11:11
professionalEddy Vluggen27-Jan-20 11:11 
AnswerRe: Expando object - creating a dynamic class and reading the property types in a unit test Pin
Simon_Whale27-Jan-20 12:43
Simon_Whale27-Jan-20 12:43 
GeneralRe: Expando object - creating a dynamic class and reading the property types in a unit test Pin
Eddy Vluggen27-Jan-20 14:31
professionalEddy Vluggen27-Jan-20 14:31 
QuestionRegExReplace \K (discard what has been matched so far) workaround / Alternative Pin
Lupu5R3x24-Jan-20 2:31
Lupu5R3x24-Jan-20 2:31 
AnswerRe: RegExReplace \K (discard what has been matched so far) workaround / Alternative Pin
Pete O'Hanlon24-Jan-20 3:38
mvePete O'Hanlon24-Jan-20 3:38 
GeneralRe: RegExReplace \K (discard what has been matched so far) workaround / Alternative Pin
Lupu5R3x24-Jan-20 4:03
Lupu5R3x24-Jan-20 4:03 
AnswerRe: RegExReplace \K (discard what has been matched so far) workaround / Alternative Pin
Gerry Schmitz24-Jan-20 5:00
mveGerry Schmitz24-Jan-20 5:00 
GeneralRe: RegExReplace \K (discard what has been matched so far) workaround / Alternative Pin
Lupu5R3x24-Jan-20 6:11
Lupu5R3x24-Jan-20 6:11 
GeneralRe: RegExReplace \K (discard what has been matched so far) workaround / Alternative Pin
Gerry Schmitz24-Jan-20 7:20
mveGerry Schmitz24-Jan-20 7:20 
GeneralRe: RegExReplace \K (discard what has been matched so far) workaround / Alternative Pin
Lupu5R3x24-Jan-20 8:01
Lupu5R3x24-Jan-20 8:01 
AnswerRe: RegExReplace \K (discard what has been matched so far) workaround / Alternative Pin
Lupu5R3x24-Jan-20 7:47
Lupu5R3x24-Jan-20 7:47 
GeneralRe: RegExReplace \K (discard what has been matched so far) workaround / Alternative Pin
Gerry Schmitz24-Jan-20 8:09
mveGerry Schmitz24-Jan-20 8:09 
GeneralRe: RegExReplace \K (discard what has been matched so far) workaround / Alternative Pin
Lupu5R3x24-Jan-20 8:21
Lupu5R3x24-Jan-20 8:21 
GeneralRe: RegExReplace \K (discard what has been matched so far) workaround / Alternative Pin
Gerry Schmitz24-Jan-20 8:39
mveGerry Schmitz24-Jan-20 8:39 
GeneralRe: RegExReplace \K (discard what has been matched so far) workaround / Alternative Pin
Lupu5R3x24-Jan-20 8:45
Lupu5R3x24-Jan-20 8:45 
QuestionCrystal Report Load Report failed error Pin
Member 1466074223-Jan-20 16:59
Member 1466074223-Jan-20 16:59 
AnswerRe: Crystal Report Load Report failed error Pin
Pete O'Hanlon23-Jan-20 21:25
mvePete O'Hanlon23-Jan-20 21:25 

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.