» Home » type » Page 1
Is this a bug? : I get “ The type … is not a complex type or an entity type” in my WCF data service using the Reflection provider
by Kubla Khan in Programming Languages

When invoking a query on the data service I get this error message inside the XML feed:

<m:message xml:lang="nl-NL">Internal Server Error. The type 'MyType' is not a complex type or an entity type.</m:message>

When I use the example described here in the art

Casting generic to interface type - Unable to cast object of type 'System.RuntimeType' to type
by Silverforce11 in Programming Languages

I have some classes like this:

public class Customer
{ }
public interface IRepository
{ }
public class Repository<T> : IRepository
{ }
public class CustomerRepository<Customer>
{ }

Then, as per the answer to this question I can use reflection to get a list of types referenced by generics for each of my *Reposito

Avoiding “Target type 'type name' is not convertible to base type System.String”
by krs in Programming Languages

I am using ReSharper 6.1.1 and having the solution wide analysis enabled in my project shows up with an error:

Target type 'CustomControls.XSButton' is not convertible to base type System.String

The code compiles and runs fine since a built in TypeConverter in WPF takes care of this, shortly described in a ReSharper bug report.

Note that the XSButton<

How to add multiple generic type constraints for a type parameter in VS 2010 UML Class Diagram parameterized type?
by Steven Weber in Programming Languages
namespace ConsoleApplication8
public class Foo<T>
where T : IFoo, IFoo2
public Foo(T fooThing)
public interface IFoo
string Name {get;}
public interface IFoo2
string Name2 {get;}

Compile Error: Cannot implicitly convert type to type, random characters added to name of one type (WCF)
by lockdown571 in Development Tools & Services

I have a project using WCF which was working fine, but I moved the code to another machine and now it will not compile. I get errors for lines of code like this, where I instantiate a class and then call a service client:

FlooringReportingServiceClient.FlooringReportingServiceClient client = new FlooringReportingServiceClient.FlooringReportingServiceClient();

App Engine 1.7.5 “TypeError: <type 'str'> has type <type 'str'>, but expected one of: int, long, bool”
by nobodyzzz in Web Design

I am getting the following stack trace in production on AppEngine 1.7.5 when sending .put() to an NDB object. The code works fine in a local development instance. Has anyone else experienced this?

File "/python27_runtime/python27_lib/versions/1/google/appengine/ext/ndb/model.py", line 3187, in _put
return self._put_async(**ctx_options).get_result()
File "/python27_

Getting a Method may only be called on a Type for which Type.IsGenericParameter is true. On a overload type in my ViewModel
by wraith in Programming Languages

Here is the Property in the Base Class

[ReadOnly(true), Display(GroupName = "Payment Details")]
public virtual GridViewModel<PaymentDetails> Details { get; set; }

Here is the Property in the Inherited Class

[Display(AutoGenerateField = false, AutoGenerateFilter = false), ScaffoldColumn(false)]
public override GridViewModel&l

Scala: contravariant type A occurs in covariant position in type >: A <: Any of type B
by Piriya in Programming Languages

The compiler is telling me this can't be with a warning of: "contravariant type A occurs in covariant position in type >: A <: Any of type B." The warning is in the type parameter of the compose method. Logically the type definition makes sense to me. If the compiler has no qualms with andThen, why the problem with the converse?

trait Foo[-A]{
def compose[B >: A](t:

cannot convert data (type interface {}) to type string: need type assertion
by camt in Web Design

I am pretty new to go and I was playing with this notify package.

At first I had code that looked like this:

func doit(w http.ResponseWriter, r *http.Request) {
notify.Post("my_event", "Hello World!")
fmt.Fprint(w, "+OK")

I wanted to append newline to Hello World! but not in the function doit abov

Converting Generic Type into reference type after checking its type using GetType(). How?
by Jan D in Programming Languages

i am trying to call a function that is defined in a class RFIDeas_Wrapper(dll being used).
But when i checked for type of reader and after that i used it to call function it shows me error Cannot convert type T to RFIDeas_Wrapper.


private List<string> GetTagCollection<T>(T Reader)

Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .