Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 1560

C# is a multiparadigm, managed, garbage-collected object-oriented programming language created by Microsoft in parallel with the .NET platform

15 votes
6 answers
28k views

What naming Convention to Use for C# Function Parameters

There are situations when a name passed in Parameter will be Cast into a new type, but the name of the Passed object should remain similar. For the case of Class Attributes, we can use this operator, …
Shamim Hafiz - MSFT's user avatar
10 votes
5 answers
42k views

Is it possible for two DLLs to conflict , preventing solution to build

Though I have a specific case, but I was wondering about the general situation. Can two DLLs, when added as Reference to a Visual C# project collide with each other to prevent the solution from build …
Shamim Hafiz - MSFT's user avatar
7 votes
4 answers
2k views

The need for Explicit Type Conversion in C#

Consider the following code: DerivedClass drbObj = (DerivedClass)obj; Here obj is of type Object and this is reasonable since Object is the base type of every Class in C#. Here, since the type of …
Shamim Hafiz - MSFT's user avatar
6 votes
6 answers
5k views

Organizing Class Members in Regards to Access Modifier

If we look at typical implementation of a Class, we usually see the private members defined at the beginning and public( mostly functions and Accessors) defined towards the bottom. Now, is this a Indu …
Shamim Hafiz - MSFT's user avatar
6 votes
1 answer
6k views

Do we really need SerializableAttribute?

I understand we need it to mark a class whose objects can be serialized, but do we strictly need this for behind the hood logic to work? We could just serialize the object using necessary methods. On …
Shamim Hafiz - MSFT's user avatar
6 votes
2 answers
9k views

Should I use a Class or Dictionary to Store Form Values

I am working on a C# .NET Application, where I have a Form with lots of controls. I need to perform computations depending on the values of the controls. Therefore, I need to pass the Form values to a …
Shamim Hafiz - MSFT's user avatar
0 votes
1 answer
2k views

C# Unit Testing: Mock a Return Type

What is the best way to Mock a return type if we don't care about the actual state of the object. For example, I am Mocking a method whose return type is: IEnumerable<Document> Now, I can add releva …
Shamim Hafiz - MSFT's user avatar
0 votes
2 answers
4k views

How are interrupts implemented in practice? [closed]

Consider an USB device that is receiving data over a wireless network and an application running on the PC is reading this data. Now, on many languages (consider C# DataReceived), we have event handli …
Shamim Hafiz - MSFT's user avatar