All Questions
646
questions with no upvoted or accepted answers
6
votes
1
answer
2k
views
mapping complex class with NPOCO
Is it possible to map a complex class with both a nested class and a collection class with NPoco? I've had a look at the documentation but it's not 100% clear whether i can map to this class with one ...
5
votes
1
answer
456
views
InvalidOperationException when Serializing an object with a IXmlSerializable object
I've come across some interesting behavior with the XmlSerializer.
If I try to serialize a class that has a property of Type object and that object implements IXmlSerializable, the serializer will ...
3
votes
1
answer
1k
views
Can I convert a list with objects into a two dimensional array
I don't know if this is possible in c# but it would be great if it was. I have a list of objects which is very easy to convert into an array with the code below:
object [] myArray = wrd.ToArray();
...
3
votes
1
answer
247
views
How to abstract a value from an object within an object?
I am a little stuck on how to get a value from an object within an object. I have tried numerous methods but cant seem to return the value.
var results return Json this:
{
"Date": "2016-12-14"
"...
3
votes
0
answers
742
views
Comparing two variables of type "object"
I have a rather complex question that I'm struggling to find a workaround to.
Basically, because the Unity engine does not support .NET 4, I'm struggling to find a an alternative to using variables ...
3
votes
2
answers
68
views
singleton pattern - creation of object
I am in the process of understanding the singleton pattern. I have written a small piece of code here
Program.cs:
class Program
{
static void Main(string[] args)
{
SingleObject ...
3
votes
1
answer
491
views
Entity Framework 6 - Creating dynamic repository not working / Object not match target
i'm using this code.
public virtual ObjectQuery<BaseObject> GetTypifiedBDOSet()
{
MethodInfo methodInfo = typeof(ObjectQuery<BaseObject>).GetMethod("OfType", new Type[] { });
...
3
votes
1
answer
2k
views
Accessing Object data in repeater
I have a repeater on my asp.net web forms page.
The repeater data source is a list of "OrderLine" objects.
Each repeater item has a TextBox control that displays the quantity of the order line.
...
3
votes
1
answer
2k
views
How to pass object as method parameter in vbscript
I trying make small test in vbscript so created very, very simple dll in C#(i am new) and want to use it in vbscript.
C# code
using System;
using System.Collections.Generic;
using System.Linq;
using ...
2
votes
1
answer
2k
views
gRPC: How to use dynamically typed values?
I'm trying using gRPC dynamically typed values but with the little information about their usefulness, It's almost impossible to do this... So I will show the image/code that I have problems and the ...
2
votes
0
answers
178
views
System.Object null
I would like to know why when I go to definition in the class Object all the methods throw null like in the picture attached.
2
votes
1
answer
60
views
Persist an object even after session gets expire
I'm currently working on a POC in which I need to persist a unique object for each request. My application post a form on some other site and wait for the response from that site on my response ...
2
votes
1
answer
2k
views
List of objects equality using .GetHashCode()
I would like to understand how the GetHashCode method works on lists of objects for equality. Given this example:
var user1 = new User { Id = Guid.NewGuid().ToString(), Name = "Chris" };
var user2 = ...
2
votes
0
answers
63
views
Detection of two collider in the same object
I have a problem, I have a 3D animation and I added two colliders
I did this because I want to detect when the user touch the head, the chest or the abs zone. And as the picture shows, in the ...
2
votes
2
answers
1k
views
C# serialize complex object of class to json
I want to convert new object of following class to json string. for this i use either JavaScriptSerializer and Newtonsoft library. but the out put for both of them is empty brackets ( {[],[]} )!
...