¡@

Home 

c# Programming Glossary: cannot

Direct casting vs 'as' operator?

http://stackoverflow.com/questions/132445/direct-casting-vs-as-operator

if o is not a string or if o is null . For this reason you cannot use it with value types the operator could never return null..

Simple 2 way encryption for C#

http://stackoverflow.com/questions/165808/simple-2-way-encryption-for-c-sharp

str However this results in character values that cannot be passed in a URL. So instead I just lay out all of the byte..

.NET Process Monitor

http://stackoverflow.com/questions/1986249/net-process-monitor

to determine if a process is running but the application cannot grab the process if it has since stopped. Process process Process.GetProcessesByName..

Conditional operator cannot cast implicitly?

http://stackoverflow.com/questions/2215745/conditional-operator-cannot-cast-implicitly

operator cannot cast implicitly I'm a little stumped by this little C# quirk..

When to Use Static Classes in C#

http://stackoverflow.com/questions/241339/when-to-use-static-classes-in-c-sharp

of it but that's just gross. Interface woes Static methods cannot be defined through interfaces for logic reasons. And since we..

What 'additional configuration' is necessary to reference a .NET 2.0 mixed mode assembly in a .NET 4.0 project?

http://stackoverflow.com/questions/2455654/what-additional-configuration-is-necessary-to-reference-a-net-2-0-mixed-mode

is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration..

Why is lock(this) {…} bad?

http://stackoverflow.com/questions/251391/why-is-lockthis-bad

key . If a lock is already being held on that key the lock cannot be made otherwise the lock is allowed. This is why it's bad..

Deserialize JSON into C# dynamic object?

http://stackoverflow.com/questions/3142495/deserialize-json-into-c-sharp-dynamic-object

to give Vlad an upvote if that's helpful However if you cannot assume the client environment includes this DLL then the above..

Use of Application.DoEvents()

http://stackoverflow.com/questions/5181777/use-of-application-doevents

the dialog. Now that 3 feet problem is solved the user cannot do anything to mess up the logic. Both the close the window..

The entity cannot be constructed in a LINQ to Entities query

http://stackoverflow.com/questions/5325797/the-entity-cannot-be-constructed-in-a-linq-to-entities-query

entity cannot be constructed in a LINQ to Entities query There is an entity.. following error The entity or complex type Shop.Product cannot be constructed in a LINQ to Entities query var products productRepository.GetProducts.. c# entity framework share improve this question You cannot and should not be able to project onto a mapped entity. You..

How to get the type of T from a generic List<T>

http://stackoverflow.com/questions/557340/how-to-get-the-type-of-t-from-a-generic-listt

e.g. the list called abc contain what type of object I cannot do abc 0 .GetType because the list might contain zero elements...

In C#, why can't a List<string> object be stored in a List<object> variable

http://stackoverflow.com/questions/6557/in-c-why-cant-a-liststring-object-be-stored-in-a-listobject-variable

in a List object variable It seems that a List object cannot be stored in a List variable in C# and can't even be explicitly..

Create Generic method constraining T to an Enum

http://stackoverflow.com/questions/79126/create-generic-method-constraining-t-to-an-enum

item return defaultValue I am getting a Error Constraint cannot be special class 'System.Enum'. Fair enough but is there a workaround..

What does the [Flags] Enum Attribute mean in C#?

http://stackoverflow.com/questions/8447/what-does-the-flags-enum-attribute-mean-in-c

of the flag enumerated constant whose value is zero. You cannot use the None enumerated constant in a bitwise AND operation..

Nullable types and the ternary operator: why is `? 10 : null` forbidden? [duplicate]

http://stackoverflow.com/questions/858080/nullable-types-and-the-ternary-operator-why-is-10-null-forbidden

compiler complains Error 1 Type of conditional expression cannot be determined because there is no implicit conversion between..

Resizing an Image without losing any quality [closed]

http://stackoverflow.com/questions/87753/resizing-an-image-without-losing-any-quality

closed I need to resize an image but the image quality cannot be affected by this. c# image image scaling share improve..

Is there a reason for C#'s reuse of the variable in a foreach?

http://stackoverflow.com/questions/8898925/is-there-a-reason-for-cs-reuse-of-the-variable-in-a-foreach

finalString s However variables defined in a foreach loop cannot be used outside the loop foreach string s in strings var finalString..

How can I detect the encoding/codepage of a text file

http://stackoverflow.com/questions/90838/how-can-i-detect-the-encoding-codepage-of-a-text-file

message you have to know what encoding it is in or you cannot interpret it or display it to users correctly. share improve..

Problem with converting int to string in Linq to entities

http://stackoverflow.com/questions/1066760/problem-with-converting-int-to-string-in-linq-to-entities

from c in contacts select new ListItem Value c.ContactId Cannot implicitly convert type 'int' ContactId to 'string' Value ...

Using JsonConvert.DeserializeObject to deserialize Json to a C# POCO class

http://stackoverflow.com/questions/11126242/using-jsonconvert-deserializeobject-to-deserialize-json-to-a-c-sharp-poco-class

User response return outObject This fires an exception Cannot deserialize the current JSON object e.g. name value into type..

XML Serialize generic list of serializable objects

http://stackoverflow.com/questions/1212742/xml-serialize-generic-list-of-serializable-objects

run this code it errors on the XMLSerializer ... line with Cannot serialize interface System.Runtime.Serialization.ISerializable...

How to execute a stored procedure within C# program

http://stackoverflow.com/questions/1260952/how-to-execute-a-stored-procedure-within-c-sharp-program

p.RunStoredProc Console.Read This displays the exception Cannot find the stored procedure dbo.test . Do I need to provide the..

XML serialization of interface property

http://stackoverflow.com/questions/1333864/xml-serialization-of-interface-property

an object of this class I receive the following error Cannot serialize member Example.Model of type Example because it is..

Cannot use ref or out parameter in lambda expressions

http://stackoverflow.com/questions/1365689/cannot-use-ref-or-out-parameter-in-lambda-expressions

use ref or out parameter in lambda expressions Why can't you..

Conditional operator cannot cast implicitly?

http://stackoverflow.com/questions/2215745/conditional-operator-cannot-cast-implicitly

0 But this will not aByteValue aBoolValue 1 0 Error says Cannot implicitly convert type 'int' to 'byte'. And of course this..

Anonymous method in Invoke call

http://stackoverflow.com/questions/253138/anonymous-method-in-invoke-call

to this method The above will result in a compiler error Cannot convert anonymous method to type 'System.Delegate' because it..

Under what circumstances is an SqlConnection automatically enlisted in an ambient TransactionScope Transaction?

http://stackoverflow.com/questions/2884863/under-what-circumstances-is-an-sqlconnection-automatically-enlisted-in-an-ambien

you try to enlist in a new transaction scope transaction Cannot enlist in the transaction because a local transaction is in..

Calling generic method with a type argument known only at execution time

http://stackoverflow.com/questions/325156/calling-generic-method-with-a-type-argument-known-only-at-execution-time

Still get compile error here I get Cannot apply operator ' ' to operands of type 'method group' and 'System.Type'..

Cannot delete directory with Directory.Delete(path, true)

http://stackoverflow.com/questions/329355/cannot-delete-directory-with-directory-deletepath-true

delete directory with Directory.Delete path true I'm using..

When setting a form's opacity should I use a decimal or double?

http://stackoverflow.com/questions/4/when-setting-a-forms-opacity-should-i-use-a-decimal-or-double

this.Opacity trans When I try to build it I get this error Cannot implicitly convert type 'decimal' to 'double'. I tried making..

Integer summing blues, short += short problem

http://stackoverflow.com/questions/4343624/integer-summing-blues-short-short-problem

problem Program in C# short a b a 10 b 10 a a b Error Cannot implicitly convert type 'int' to 'short'. we can also write..

Serialize Class containing Dictionary member

http://stackoverflow.com/questions/495647/serialize-class-containing-dictionary-member

type 'App.ConfigFile'. snip System.NotSupportedException Cannot serialize member App.Configfile.mappedDrives snip From what..

NTFS Alternate Data Streams - .NET

http://stackoverflow.com/questions/604960/ntfs-alternate-data-streams-net

0 NULL if hFile INVALID_HANDLE_VALUE printf Cannot open testfile n else WriteFile hFile This is testfile 16 dwRet.. 0 NULL if hStream INVALID_HANDLE_VALUE printf Cannot open testfile stream n else WriteFile hStream This is testfile..

In C#, why can't a List<string> object be stored in a List<object> variable

http://stackoverflow.com/questions/6557/in-c-why-cant-a-liststring-object-be-stored-in-a-listobject-variable

string sl new List string List object ol ol sl results in Cannot implicitly convert type System.Collections.Generic.List string.. List string List object ol ol List object sl results in Cannot convert type System.Collections.Generic.List string to System.Collections.Generic.List..

Comparing Arrays in C#

http://stackoverflow.com/questions/713341/comparing-arrays-in-c-sharp

a1.Length i if Object.Equals list1 i list2 i error CS0021 Cannot apply indexing with to an expression of type 'IList' x2 return..

byte + byte = int… why?

http://stackoverflow.com/questions/941584/byte-byte-int-why

at this C# code... byte x 1 byte y 2 byte z x y ERROR Cannot implicitly convert type 'int' to 'byte' The result of any math..