Recent content by fakeNoose

  1. fakeNoose

    Question How to Cast Object to List<int>

    Ahh, I learned something new, thanks again!
  2. fakeNoose

    Question How to Cast Object to List<int>

    The problem with that is every thing that in the object 'id' isn't necessarily a list. I removed all of the non relevant properties from code on here. I'm using Reflections in the else for everything else. Reflections just kept failing for me with lists...
  3. fakeNoose

    Question How to Cast Object to List<int>

    I figured it out, I just needed to cast the object as dynamic. Thank you for your help!!! foreach (var n in (dynamic)v.Value) { _characterList.Add((int)n); }
  4. fakeNoose

    Question How to Cast Object to List<int>

    Hey, thanks for the help! That unfortunately didn't work. Visual studio throws the error: "foreach statement cannot operate on variables of type 'object' because 'object' does not contain a public instance definition for 'GetEnumerator'" I don't understand why it's actually matching that...
  5. fakeNoose

    Question How to Cast Object to List<int>

    Hey everyone, I have an API that is converting my List<int> into an object so that it can be sent over the network. When I get it on the receiving end I'm trying to convert it back to a List<int> but I can't figure out how to do that. When I print the object.ToString() out I see the below...
  6. fakeNoose

    Resolved Mysql.Data Connection must be valid and open error when trying to ExecuteReader

    To be honest, after I made this post I removed the nested try catch. Not even sure what I was thinking when I put that in. Thank you for this, I figured the way I was doing it wasn't the right way. Thanks for all of the suggestions. It's really helpful!
  7. fakeNoose

    Resolved Mysql.Data Connection must be valid and open error when trying to ExecuteReader

    Well now I feel like an idiot. Thanks for the help!
  8. fakeNoose

    Resolved Mysql.Data Connection must be valid and open error when trying to ExecuteReader

    Hey guys, I'm fairly new to C#, and I'm completely failing to understand why I keep getting this Connection must be valid and open error when I try to run ExecuteReader. I know the connection to the database is successful, for some reason this error only throws if I'm doing it within a using...
Top Bottom