Sunday, June 29, 2008

C Sharp Interview Questions: Keywords

C Sharp Interview Questions: Keywords

1. List several C# keywords.

abstract
as
base
bool
break
byte
case
catch
char
checked
class
const
continue
decimal
default
delegate,
do,
double
else
enum
event
explicit
extern
false
finally
fixed
float
for
foreach
goto
if
implicit
in
int
interface
internal
is
lock
long
namespace
new
null
object
operator
out
override
params
private
protected
public
readonly
ref
return
sbyte
sealed
short
sizeof
stackalloc
static
string
struct
switch
this
throw
true
try
typeof
uint
ulong
unchecked
unsafe
ushort
using
virtual
volatile
void
while

2. List Several C# Contextual Keywords

from
get
group
into
join
let
orderby
partial (as a type)
partial (as a method)
select
set
value
var
where (generic type constraint)
where (query clause)
yield

3. List several C# Value Type keywords.


bool
byte
char
decimal,
enum
int
long
sbyte
short
struct
uint
ulong
ushort

(note string is a built in reference type, your call on grading it)


4. List several C# Reference Type keywords.


class,
delegate,
interface

(object and string are built in reference types)



5. List several C# Access Modifier keywords.

internal
private
protected
public


6. List several C# Modifier keywords (class modifiers, method modifiers...)

abstract
const
event
extern
override
readonly
sealed
static
unsafe
virtual
volatile



7. List several C# keywords involving iteration statements.

do
for
foreach
in
while


8. List several C# keywords involving selection statements.

if
else
switch


9. List several C# keywords involving jump statements.

break
continue
goto
return

10. List several C# keywords involving Exception Handling statements.

throw
try
catch
finally


11. List several C# keywords involving method parameters.

params
ref
out


12. List several C# keywords involving namespaces.

namespace
using


13. List several C# keywords involving operator.

as
checked
is
new
sizeof
typeof
true
false
stackalloc
unchecked


14. List several C# keywords involving conversion operators.

explicit
implicit
operator



15. List several C# keywords involving access (class access).

base
this


16. List several C# default keywords.

true
false
null

No comments: