Click here to Skip to main content
15,925,309 members
Home / Discussions / C#
   

C#

 
AnswerRe: Text to Audio in C#? Pin
Afzaal Ahmad Zeeshan24-Jul-15 8:10
professionalAfzaal Ahmad Zeeshan24-Jul-15 8:10 
GeneralRe: Text to Audio in C#? Pin
Shailendra Singh Chauhan24-Jul-15 17:08
Shailendra Singh Chauhan24-Jul-15 17:08 
Questionchange focous when enter texbox Pin
Cenator23-Jul-15 23:14
Cenator23-Jul-15 23:14 
AnswerRe: change focous when enter texbox Pin
OriginalGriff23-Jul-15 23:26
mveOriginalGriff23-Jul-15 23:26 
GeneralRe: change focous when enter texbox Pin
Cenator23-Jul-15 23:54
Cenator23-Jul-15 23:54 
GeneralRe: change focous when enter texbox Pin
Dave Kreskowiak24-Jul-15 2:12
mveDave Kreskowiak24-Jul-15 2:12 
QuestionRe: change focous when enter texbox Pin
Cenator24-Jul-15 2:46
Cenator24-Jul-15 2:46 
AnswerRe: change focous when enter texbox Pin
Dave Kreskowiak24-Jul-15 3:37
mveDave Kreskowiak24-Jul-15 3:37 
GeneralRe: change focous when enter texbox Pin
Cenator24-Jul-15 3:54
Cenator24-Jul-15 3:54 
QuestionChanging IP Address with program. Pin
Member 1129387623-Jul-15 22:14
Member 1129387623-Jul-15 22:14 
AnswerRe: Changing IP Address with program. Pin
OriginalGriff23-Jul-15 23:24
mveOriginalGriff23-Jul-15 23:24 
QuestionC# program for my SSIS script task help Pin
czaar99923-Jul-15 21:16
czaar99923-Jul-15 21:16 
AnswerRe: C# program for my SSIS script task help Pin
Richard Deeming24-Jul-15 2:32
mveRichard Deeming24-Jul-15 2:32 
GeneralRe: C# program for my SSIS script task help Pin
czaar99924-Jul-15 21:42
czaar99924-Jul-15 21:42 
QuestionWays to store and insert x rows from mvc application to database Pin
ShikhaSC23-Jul-15 20:34
ShikhaSC23-Jul-15 20:34 
AnswerRe: Ways to store and insert x rows from mvc application to database Pin
Herman<T>.Instance23-Jul-15 21:21
Herman<T>.Instance23-Jul-15 21:21 
QuestionHow to raise font Height ? Pin
goldsoft23-Jul-15 9:38
goldsoft23-Jul-15 9:38 
AnswerRe: How to raise font Height ? Pin
Richard Deeming23-Jul-15 9:52
mveRichard Deeming23-Jul-15 9:52 
AnswerRe: How to raise font Height ? Pin
Sascha Lefèvre23-Jul-15 10:00
professionalSascha Lefèvre23-Jul-15 10:00 
GeneralRe: How to raise font Height ? Pin
goldsoft23-Jul-15 11:39
goldsoft23-Jul-15 11:39 
GeneralRe: How to raise font Height ? Pin
Richard MacCutchan23-Jul-15 20:54
mveRichard MacCutchan23-Jul-15 20:54 
GeneralRe: How to raise font Height ? Pin
Eddy Vluggen23-Jul-15 21:42
professionalEddy Vluggen23-Jul-15 21:42 
Questiontext to audio Pin
Member 1185276323-Jul-15 7:49
Member 1185276323-Jul-15 7:49 
AnswerRe: text to audio Pin
Dave Kreskowiak23-Jul-15 8:21
mveDave Kreskowiak23-Jul-15 8:21 
QuestionObject does not match target type Pin
Gilbert Consellado23-Jul-15 2:47
professionalGilbert Consellado23-Jul-15 2:47 
the sample class

C#
public class Foo{
 public string Name {get;set;}
 public bool IsLocked {get;set;}
 public double LockID {get;set;}
}


and i have this method

C#
public dictionary<string, object> GetSettings()
{
//read the setting files using the FIle.ReadAllLines(pathtosetting)

 return somethig;
}


then when i access it like this

C#
var sample = new Foo();
var prop = sample.GetType();
foreach(var item in GetSettings())
{
//the item.key is the property name of Foo
 prop.GetProperty(item.key, BindingFlags.public | BindingFlags.Instance).SetValue(prop, item.Value, null)
}


then i got an exception "Object does not match target type"
I cant find any solution on the web

I will appreciate for any advice will come
thank you

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.