Contents[hide] |
[edit]
C# Frequently Asked Questions (FAQ)
[edit]
The C# Language FAQ
- Am I missing an assembly reference?
- Are C# constructors inherited?
- Are C# parameters passed by reference or by value ?
- Can a property have different
getandsetaccess? - Can
constandstaticbe used together? - Can I directly call a native function exported from a DLL?
- Do unused references to external assemblies lead to code bloat?
- Does C# have its own class library?
- Does C# have macros or a preprocessor?
- Does C# support custom exceptions?
- Does C# support jagged arrays?
- Does C# support variable method arguments (
vararg)? - How call overloaded operators from non-supporting languages?
- How can I force garbage collection?
- How can I output simple debugging messages?
- How can one constructor call another?
- How check the object type at runtime?
- How can type name clashes be resolved?
- How do destructors work in C#?
- How do I declare an
outvariable? - How do I get
DllImportto work? - How do I make a C# DLL?
- How do I use
traceandassert? - How get the type name at runtime?
- How keep a local variable in scope across a
try-catchblock? - How make sure C# classes will interoperate with other .NET languages?
- How perform a case insensitive string comparison?
- How process command line arguments?
- How specify a C# literal type?
- How subscribe to events exposed by remoted objects?
- How to obtain type information on the fly using
typeof? - How use an alias for a class or namespace?
- How would I create a
DelegateorMulticastDelegate? - Is there C# support for C-type macros?
- Is there C# support for templates?
- What are the C# character escape sequences (
\)? - What does at sign (
@) identifier mean? - What does "Object reference not set to an instance of an object" mean?
- What is a namespace?
- What is a type alias?
- What is C#?
- What is a C# response file?
- What is a verbatim string literal (
@)? - What is the C# Language Specification?
- What is the
#definepreprocessor directive? - What is the difference between
constandstaticreadonly? - What is the difference between
delegateandevent? - What is the difference between GetType() and typeof?
- What is the difference between
newandoverride? - What is the difference between the
outandrefparameter modifiers? - What is the difference between
stringandSystem.String? - What is the difference between using a cast and the
asoperator? - What is the syntax for calling an overloaded constructor from within a constructor?
- What is the use of the C# compiler's
/target:command line option? - What is the Windows Class Viewer?
- What software is needed to develop C# applications?
- When should an exception be thrown?
- When should
Equalsand==be used? - Will
Console.WriteLine()stop printing upon encountering aNULLcharacter in a string? - Why add a
usingstatement and a reference? - Why are hashtable lookups so slow with
structkeys? - Why do I get a syntax error when I try to declare a variable named
checked? - Why does C# not support checked exceptions?
- Why does my Windows application open a console window each time it is run?
- Why doesn't the C#
switchstatement work like I expect it to? - Why doesn't a Windows Form project use visual styles in XP?
- Why get an error (CS1006) when declaring a method without a return type?
- Why must struct constructors have at least one argument?
[edit]
C# and .NET FAQ
- What is .NET?
- Must the framework be installed to run .NET applications?
- Does .NET run only on Windows?
- What do all the .NET acronyms mean?
- Are .NET generics like C++ templates?
- How enforce coding guidelines for custom .NET assemblies?
- Is there a .NET equivalent to
regsvr32? - How call a method using a name string?
- Are there free .NET decompilers?
- How good are .NET decompilers?
- How protect .NET code from reverse engineering?
- How protect my code against decompilation?
- What about .NET decompilers that allow code to be submitted from browsers?
- What does a .NET decompiler do?
- How start another program from .NET?
- How ensure that only one instance of an application will run?
- How to read files with accented characters?
- How get assembly attributes at runtime?
- Why does .NET make arithmetic errors?
- How display
intas a binary number, a string of 0s and 1s? - Should calling
Initialize()on a reference type array fill it with objects? - What compression and zipping capabilities does .NET have?
- How convert a
stringtype to aninttype? - What is the difference between
Convert.ToInt32(string)andInt32.Parse(string)? - How create an instance of a type using only its name?
- What is the easiest way to fetch a Web page in .NET?
[edit]
C# and C FAQ
[edit]
C# and C++ FAQ
- Are .NET generics like C++ templates?
- Are all C# methods
virtual? - Are constructors the same in C++ and C#?
- Are destructors the same in C++ and C#?
- Are references the same in C++ and C#?
- Are standard types the same in C++ and C#?
- Are structs the same in C++ and C#?
- Does C# check array bounds? (array bounds checking)
- Does C# have global methods?
- Does C# have multiple inheritance like C++?
- Does C# replace C++?
- How call a virtual method from a constructor or destructor?
- How declare a pure virtual function in C#?
- How enforce constructor correctness in C#?
- How make a C# destructor virtual?
- Is a C++ abstract class like a C# interface?
- Is
typedefavailable in C#? - What are the differences between C# and C++ inheritance syntax?
[edit]
C# and Java Language FAQ
- Are C# classes allocated on the heap?
- Are C# strings immutable?
- Does C# have a
throwsclause? - Does C# support boxing?
- Does C# support
finalclasses? - Does C# support jagged arrays?
- Does C# support static initialization blocks?
- How do Java and C# objects compare?
- What are the differences between C# and Java access modifiers?
- What are the differences between C# and Java constant declarations?
- What are the differences between C# and Java constructors?
- What are the differences between C# and Java exceptions?
- What are the differences between C# and Java garbage collection?
- What are the differences between C# and Java generics?
- What are the differences between C# and Java inheritance syntax?
- What are the differences between C# and Java keywords?
- What are the differences between C# and Java
Mainmethods? - What are the differences between C# and Java member initialization?
- What are the differences between C# and Java primitive types?
- What are the differences between C# and Java reflection?
- What are the differences between C# and Java runtimes?
- What are the differences between C# and Java variable length parameter lists?
- What are the differences between C# and Java virtual machines?
- What are the differences between C# finalizers and Java destructors?
- What is the difference between C# and Java array declarations?
- What is the difference between C# and Java constructor chaining?
- What is the difference between C# and Java enumerations (
enum)? - What is the difference between C# and Java
foreachloops? - What is the difference between C# and Java threads?
- What is the difference between C#
lockand Javasynchronized? - What is the difference between C#
usingand Javapackage? - What is the difference between calling base class constructors in C# and Java?
- What is the difference between metadata annotations in C# and Java?
- What is the difference between nested classes in C# and Java?
[edit]
C# and Visual Basic (VB) FAQ
- Does C# have
withfrom Visual Basic (VB)? - How do I convert or upgrade my Visual Basic (VB) application to a C# application?
- How get the rightmost part of a string?
- What is the C# equivalent of
addressofin VB? - What is the C# equivalent of
Mein VB? - What is the C# equivalent of
MyBasein VB? - What is the C# equivalent of
MyClassin VB? - What is the C# equivalent of
Nothingin VB? - Why choose C# over Visual Basic (VB)?
[edit]
C# and Visual J++ FAQ
- How can I port
synchronizedfunctions from Visual J++ to C#? - What is the C# equivalent of the J++
instanceofoperator?
[edit]
C# and ADO.NET FAQ
- How escape text in SQL statements?
- How express dates and times in SQL statements?
- What is the difference between
CloseandDispose?
[edit]
C# and Windows Forms FAQ
- How To: Monitor changes to
Clipboardcontents? - How To: Pass parameters from one form to another?
- How To: Set the background of an MDI container window?
- How To: Paste plain text into a RichTextBox?
[edit]
See also
- C# Online.NET Forums - ask and answer questions by community members.
- C# Compared to Other Languages
0 Comments