¡@

Home 

c# Programming Glossary: suppose

C# : Why doesn't 'ref' and 'out' support polymorphism?

http://stackoverflow.com/questions/1207144/c-sharp-why-doesnt-ref-and-out-support-polymorphism

on this issue. Thanks for the great question. Let's suppose you have classes Animal Mammal Reptile Giraffe Turtle and Tiger.. and Tiger with the obvious subclassing relationships. Now suppose you have a method void M ref Mammal m . M can both read and..

Distinct() with lambda?

http://stackoverflow.com/questions/1300088/distinct-with-lambda

of Equals and GetHashCode into a single interface. I suppose that makes sense.. c# c# 3.0 lambda extension methods share..

Getting attributes of Enum's value

http://stackoverflow.com/questions/1799370/getting-attributes-of-enums-value

of the enum values and not of the enum itself For example suppose I have the following enum enum FunkyAttributesEnum Description..

Which .NET Dependency Injection frameworks are worth looking into? [closed]

http://stackoverflow.com/questions/21288/which-net-dependency-injection-frameworks-are-worth-looking-into

inversion of control share improve this question I suppose I might be being a bit picky here but it's important to note..

reference assignment is atomic so why is Interlocked.Exchange(ref Object, Object) needed?

http://stackoverflow.com/questions/2192124/reference-assignment-is-atomic-so-why-is-interlocked-exchangeref-object-object

you understand how it works not right by accident. Now suppose you make a variable which is an alias of a volatile field by..

C# - Basic question: What is '?'? [duplicate]

http://stackoverflow.com/questions/2699373/c-sharp-basic-question-what-is

means in C# I'm seeing things like DateTime or int . I suppose this is specific to C# 4.0 I can't look for it in Google because..

Why are C# 3.0 object initializer constructor parentheses optional?

http://stackoverflow.com/questions/3661025/why-are-c-sharp-3-0-object-initializer-constructor-parentheses-optional

at the spec and noodle on it as I did above. For example suppose we wanted to add a new prefix operator to C# called frob x frob..

Difference between shadowing and overriding in C#?

http://stackoverflow.com/questions/392721/difference-between-shadowing-and-overriding-in-c

C# c# share improve this question Well inheritance... suppose you have this classes class A public int Foo return 5 public..

How could the new async feature in c# 5.0 be implemented with call/cc?

http://stackoverflow.com/questions/4070237/how-could-the-new-async-feature-in-c-sharp-5-0-be-implemented-with-call-cc

somehow get the current continuation Now suppose we had an operator callcc which takes as its argument a method..

How do I execute a large SQL script (with GO commands) from c#?

http://stackoverflow.com/questions/40814/how-do-i-execute-a-large-sql-script-with-go-commands-from-c

does not like GO statements. My solution which I suppose I'll post for reference was to split the sql string on GO lines..

Why must a lambda expression be cast when supplied as a plain Delegate parameter

http://stackoverflow.com/questions/411579/why-must-a-lambda-expression-be-cast-when-supplied-as-a-plain-delegate-parameter

Just knowing the signature isn't enough. For instance suppose I have public delegate void Action1 public delegate void Action2..

Integer summing blues, short += short problem

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

The first is why is short plus short result in int Well suppose short plus short was short and see what happens short prices..

How can I programmatically determine if my workstation is locked?

http://stackoverflow.com/questions/44980/how-can-i-programmatically-determine-if-my-workstation-is-locked

at work rather than home or in addition to home I suppose but it's locked down pretty hard courtesy of the DoD. That's..

Should we select VB.NET or C# when upgrading our legacy applications? [closed]

http://stackoverflow.com/questions/507291/should-we-select-vb-net-or-c-sharp-when-upgrading-our-legacy-applications

of wit or wisdom to impart I'd really appreciate it. I suppose in closing that the question is which language would you go.. as often as not you end up making a mistake about how it's supposed to be done. Personally I hated VB6 but I really like VB.Net..

Proper use of the IDisposable interface

http://stackoverflow.com/questions/538060/proper-use-of-the-idisposable-interface

resources such as database connections and bitmaps. But suppose that _theList in the above code contained a million strings..

Working way to make video from images in C#

http://stackoverflow.com/questions/539257/working-way-to-make-video-from-images-in-c-sharp

not found. It looks like a COM class isn't registered. I suppose I need to install something DirectShow maybe although I thought..

Group by in LINQ

http://stackoverflow.com/questions/7325278/group-by-in-linq

by in LINQ Let's suppose if we have a class like class Person internal int PersonID internal..

C# Events and Thread Safety

http://stackoverflow.com/questions/786383/c-sharp-events-and-thread-safety

just change the code to TheEvent this EventArgs.Empty Now suppose that the invocation list for that delegate has 1000 entries...

Lambda Expression using Foreach Clause [duplicate]

http://stackoverflow.com/questions/858978/lambda-expression-using-foreach-clause

05 18 foreach vs foreach.aspx ORIG More of a curiosity I suppose but one for the C# Specification Savants... Why is it that the..

Making Entity Class Closed for Changes

http://stackoverflow.com/questions/11425993/making-entity-class-closed-for-changes

comprises of Cash Payment and Gift Coupon Payments. Suppose the total amount of purchase is 550. It can be paid as following..

Static vs. non-static method

http://stackoverflow.com/questions/1184701/static-vs-non-static-method

vs. non static method Suppose you have some method that could be made static inside a non..

Splitting a string into chunks of a certain size

http://stackoverflow.com/questions/1450774/splitting-a-string-into-chunks-of-a-certain-size

a string into chunks of a certain size Suppose I had a string string str 1111222233334444 How can I break this..

How do ValueTypes derive from Object (ReferenceType) and still be ValueTypes?

http://stackoverflow.com/questions/1682231/how-do-valuetypes-derive-from-object-referencetype-and-still-be-valuetypes

to do with how things are copied. Look at it this way. Suppose I told you the following facts There are two kinds of boxes..

What to use: var or object name type? [duplicate]

http://stackoverflow.com/questions/236878/what-to-use-var-or-object-name-type

reading your code something. Let me give you an example. Suppose I have a method that returns a List string . This code is certainly..

Why isn't there generic variance for classes in C# 4.0?

http://stackoverflow.com/questions/2733346/why-isnt-there-generic-variance-for-classes-in-c-sharp-4-0

c# .net generics c# 4.0 share improve this question Suppose you had a class C T that was covariant in T. What might its.. bool IsEmpty T this Stack T stack return stack null Suppose you had covariant classes. Now you can say Stack string strings..

What use is the Aliases property of assembly references in Visual Studio 8

http://stackoverflow.com/questions/286632/what-use-is-the-aliases-property-of-assembly-references-in-visual-studio-8

share improve this question This is for extern aliases . Suppose you want to use two different types both of which are called..

Why can't yield return appear inside a try block with a catch?

http://stackoverflow.com/questions/346365/why-cant-yield-return-appear-inside-a-try-block-with-a-catch

After catch Exception e Console.WriteLine e.Message Suppose for the sake of argument that an exception is thrown by one..

Difference between shadowing and overriding in C#?

http://stackoverflow.com/questions/392721/difference-between-shadowing-and-overriding-in-c

A clB .Foo output 5 Console.WriteLine A clB .Bar output 1 Suppose you have a base class and you use the base class in all your..

Question about C# covariance

http://stackoverflow.com/questions/4034495/question-about-c-sharp-covariance

T is not covariant whereas IEnumerable T is. Here's why... Suppose IList T was covariant. The code below is clearly not type safe.....

Is there a good LINQ way to do a cartesian product?

http://stackoverflow.com/questions/4073713/is-there-a-good-linq-way-to-do-a-cartesian-product

dog2.Puppies from p3 in dog3.Puppies select new p1 p2 p3 Suppose dog1 has puppies p11 p12 dog2 has puppy p21 and dog3 has puppies..

C#: How to Make it Harder for Hacker/Cracker to Get Around or Bypass the Licensing Check?

http://stackoverflow.com/questions/4532540/c-how-to-make-it-harder-for-hacker-cracker-to-get-around-or-bypass-the-licensi

question here is to make it a little bit harder to crack. Suppose that the user has saved the License file under the Application.StartupPath..

Why does (does it really?) List<T> implement all these interfaces, not just IList<T>?

http://stackoverflow.com/questions/4817369/why-does-does-it-really-listt-implement-all-these-interfaces-not-just-ilis

no but there can be a subtle difference in one case. Suppose you have a derived class D whose base class B has implemented..

C# thread safety with get/set

http://stackoverflow.com/questions/505515/c-sharp-thread-safety-with-get-set

safety with get set This is a detail question for C#. Suppose I've got a class with an object and that object is protected..

Can I “multiply” a string (in C#)?

http://stackoverflow.com/questions/532892/can-i-multiply-a-string-in-c

I &ldquo multiply&rdquo a string in C# Suppose I have a string for example string snip li ul I want to basically..

add values to enum

http://stackoverflow.com/questions/55375/add-values-to-enum

values A B and C and extend it with value D as MyExtEnum. Suppose a method expects a myEnum value somewhere for instance as a..

Is String.Format as efficient as StringBuilder

http://stackoverflow.com/questions/6785/is-string-format-as-efficient-as-stringbuilder

String.Format as efficient as StringBuilder Suppose I have a stringbuilder in C# that does this StringBuilder sb..

C# Events and Thread Safety

http://stackoverflow.com/questions/786383/c-sharp-events-and-thread-safety

certainly a race condition but there always will be. Suppose we just change the code to TheEvent this EventArgs.Empty Now..

How can I ensure that a division of integers is always rounded up?

http://stackoverflow.com/questions/921180/how-can-i-ensure-that-a-division-of-integers-is-always-rounded-up

so we know we can come up with a testable design . Suppose we add an additional design criterion that the problem be solved..