C# Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

in c# whats does reflection accomplish

A

You can use reflection to dynamically create an instance of a type, bind the type to an existing object, or get the type from an existing object and invoke its methods or access its fields and properties.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

in c# how do you add an attribute to a class

A
[attribute]
puclic class x
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

in c# this keyword can be used to avoid having to call a class my its full name (System.Console.writeline() vs Console.Writeline();)

A

using System;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what type of data is created when serializing an object

A

bytes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

In c# what does streamiingcontext do

A

Describes the source and destination of a given serialized stream, and provides an additional caller-defined context

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

In c# what 3 things do you need to make an item serializable

A

the object to be serialized, a stream to contain the serialized object, and a Formatter. System.Runtime.Serialization

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

In c# what does SerializeInfo class accomplish

A

Stores all the data needed to serialize or deserialize an object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

In c# what attribute decoration can you use to exclude it from sereialization

A

xmlignore

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

in c# what is a ManagedThreadPool

A

provides your application with a pool of worker threads that are managed by the system, allowing you to concentrate on application tasks rather than thread management.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

in c# when should you not use a ManagedThreadPool

A

You require a foreground thread.
You require a thread to have a particular priority.
You have tasks that cause the thread to block for long periods of time. The thread pool has a maximum number of threads, so a large number of blocked thread pool threads might prevent tasks from starting.
You need to place threads into a single-threaded apartment. All ThreadPool threads are in the multithreaded apartment.
You need to have a stable identity associated with the thread, or to dedicate a thread to a task.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

in c# this keyword can be used to avoid having to call a class my its full name (System.Console.writeline() vs Console.Writeline();)

A

using System;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

in c# define a lambda expression with one paramter that is a squared expression

A

x =>x*x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

in c# paramaters for a lambda expression go on which side of the => operator

A

left

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

in c# managed code is manage by which runtime

A

common language runtime (CLR)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

in c# What is a concurrentbag

A

thread-safe bag implementation, optimized for scenarios where the same thread will be both producing and consuming data stored in the bag.”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

In c# what does the ‘?’ operator accomplsh

A

returns one of two values depending on a boolean response

17
Q

in c# use the ‘?’ operator

A

condition ? first_expression : second_expression;

18
Q

in c# when uusing the ‘?’ operator which sided expression is returned if the boolean results in a false return

A

the secod