tagged [class]

Interfaces vs. abstract classes

Interfaces vs. abstract classes In C#, when should you use interfaces and when should you use abstract classes? What can be the deciding factor?

Making a class not inherited

Making a class not inherited I am trying to create a c# class, but I dont want it to be inherited. How can I accomplish that?

23 Aug at 04:25

Why are you not able to declare a class as static in Java?

Why are you not able to declare a class as static in Java? Why are you not able to declare a class as static in Java?

2 Feb at 17:22

What is the purpose of accessors?

What is the purpose of accessors? Can somebody help me understand the `get` & `set`? Why are they needed? I can just make a public variable.

28 Jan at 19:59

Virtual/Abstract fields in C#

Virtual/Abstract fields in C# Is it possible to have a virtual/abstract field in a C# class? If so, how is it done?

20 Sep at 19:45

Why no AutoResetEventSlim in BCL?

Why no AutoResetEventSlim in BCL? Why isn't there an `AutoResetEventSlim` class in BCL? Can it be simulated using `ManualResetEventSlim`?

Casting null as an object?

Casting null as an object? I came across this code today Is there anything wrong with it or no?

20 Feb at 16:17

Interface-implementing anonymous class in C#?

Interface-implementing anonymous class in C#? Is there a construct in C# which allows you to create a anonymous class implementing an interface, just like in Java?

22 Mar at 17:8

Class libraries in VS 2015 - Building Cross Platform Libraries

Class libraries in VS 2015 - Building Cross Platform Libraries There are different class libraries I can create in VS 2015 with Xamarin installed: 1. Class Library 2. Class Library (Android) 3. Class ...

When should you use a class vs a struct in C++?

When should you use a class vs a struct in C++? In what scenarios is it better to use a `struct` vs a `class` in C++?

28 Aug at 15:34

How to check programmatically if a type is a struct or a class?

How to check programmatically if a type is a struct or a class? How to check programmatically if a type is a struct or a class?

15 Apr at 18:53

Check if a class `active` exist on element with jquery

Check if a class `active` exist on element with jquery Check if a class `active` exist on an `li` with a class `menu` For example

4 Feb at 21:17

Why is enum class preferred over plain enum?

Why is enum class preferred over plain enum? I heard a few people recommending to use enum in C++ because of their . But what does that really mean?

8 Aug at 13:33

Extension methods versus inheritance

Extension methods versus inheritance Are there rules of thumb that help determine which to use in what case? Should I prefer one over the other most times? Thanks!

JavaScript CSS how to add and remove multiple CSS classes to an element

JavaScript CSS how to add and remove multiple CSS classes to an element How can assign multiple css classes to an html element through javascript without using any libraries?

1 Jan at 12:53

C#: List All Classes in Assembly

C#: List All Classes in Assembly I'd like to output (programmatically - C#) a list of all classes in my assembly. Any hints or sample code how to do this? Reflection?

22 Aug at 09:59

In C#, use of value types vs. reference types

In C#, use of value types vs. reference types My questions are: - - - Please also discuss advantages and disadvantages of each one. I want to understand that as well.

How can I open DLL files to see what is written inside?

How can I open DLL files to see what is written inside? I lost the solution of a class library. Can I open the DLL file which is created by the ?

12 Jul at 11:49

Why can an abstract class have constructor?

Why can an abstract class have constructor? Why does an abstract class have constructor? What's the point? It's obvious that we cannot create an instance of an abstract class.

13 Nov at 03:24

Exact use of Abstract class

Exact use of Abstract class What is the exact use of an Abstract class? Is not possible to do the same things in an ordinary class as it is an an abstract class?

27 Oct at 07:17

visual studio express : free class diagram tool

visual studio express : free class diagram tool I am using c# express and would like to use a free tool to design my class diagrams. What do you recommend for a free tool?

2 Nov at 14:42

Class vs. Public Class

Class vs. Public Class What is the difference between: and: So what will be the difference between and ?

12 Sep at 16:51

What does Method<ClassName> mean?

What does Method mean? I've seen this syntax a couple times now, and it's beginning to worry me, For example:

1 Jul at 16:44

When is it appropriate to use C# partial classes?

When is it appropriate to use C# partial classes? I was wondering if someone could give me an overview of why I would use them and what advantage I would gain in the process.

21 Nov at 10:14

Having a "+" in the class name?

Having a "+" in the class name? Class name: `MyAssembly.MyClass+MyOtherClass` The problem is obviously the `+` as separator, instead of traditionnal dot, its function, and to find official documentati...

19 Feb at 16:59