Rizabek Kabzhanov
Test por , creado hace más de 1 año

Test sobre .NET(51-100), creado por Rizabek Kabzhanov el 16/05/2018.

48
0
0
Sin etiquetas
Rizabek Kabzhanov
Creado por Rizabek Kabzhanov hace alrededor de 6 años
Cerrar

.NET(51-100)

Pregunta 1 de 50

1

Which of the following methods is the best to use to draw an empty triangle?

Selecciona una de las siguientes respuestas posibles:

  • Graphics.DrawLines

  • Graphics.DrawRectangle

  • Graphics.DrawPolygon

  • Graphics.DrawEllipse

  • Graphics.FillRectangle

  • Graphics.FillPolygon

  • Graphics.FillEllipse

Explicación

Pregunta 2 de 50

1

Which of the following classes is required to draw an empty circle? (Choose 2)

Selecciona una o más de las siguientes respuestas posibles:

  • System.Drawing.Graphics

  • System.Drawing.Pen

  • System.Drawing.Brush

  • System.Drawing.Bitma

Explicación

Pregunta 3 de 50

1

Which of the following brush classes is the best to use to create a solid rectangle that is red at the top and gradually fades to white towards the bottom?

Selecciona una de las siguientes respuestas posibles:

  • System.Drawing.Drawing2D.HatchBrush

  • System.Drawing.Drawing2D.LinearGradientBrush

  • System.Drawing.Drawing2D.PathGradientBrush

  • System.Drawing.SolidBrush

  • System.Drawing.TextureBrush

Explicación

Pregunta 4 de 50

1

What type of line would the following code sample draw? // C#Graphics g = this.CreateGraphics(); Pen p = new Pen(Color.Red, 10); p.StartCap = LineCap.Flat; p.EndCap = LineCap.ArrowAnchor; g.DrawLine(p, 50, 50, 400, 50);

Selecciona una de las siguientes respuestas posibles:

  • An arrow pointing up

  • An arrow pointing down

  • An arrow pointing left

  • An arrow pointing right

Explicación

Pregunta 5 de 50

1

Which of the following classes could you use to display a JPEG image from an existing file in a form? (Choose 2)

Selecciona una o más de las siguientes respuestas posibles:

  • System.Drawing.Image

  • System.Drawing.Bitmap

  • System.Drawing.Imaging.Metafile

  • System.Windows.Forms.PictureBox

Explicación

Pregunta 6 de 50

1

How can you draw a black border around a JPEG image that you have saved to disk and then save the updated image back to the disk?

Selecciona una de las siguientes respuestas posibles:

  • Create a Graphics object by loading the JPEG image from the disk. Draw the border by calling Graphics.DrawRectangle. Finally, save the updated image by calling Graphics.Save.

  • Create a Bitmap object by loading the JPEG image from the disk. Draw the border by calling Bitmap.DrawRectangle. Finally, save the updated image by calling Bitmap.Save.

  • Create a Bitmap object by loading the JPEG image from the disk. Create a Graphics object by calling Graphics.FromImage. Draw the border by calling Graphics.DrawRectangle. Finally, save the updated image by calling Bitmap .Save.

  • Create a Bitmap object by loading the JPEG image from the disk. Create a Graphics object by calling Bitmap.CreateGraphics. Draw the border by calling Graphics.DrawRectangle. Finally, save the updated image by calling Bitmap .Save.

Explicación

Pregunta 7 de 50

1

Which format is the best choice to use if you want to save a photograph that could be opened by a wide variety of applications?

Selecciona una de las siguientes respuestas posibles:

  • ImageFormat.Bmp

  • ImageFormat.Gif

  • ImageFormat.Jpeg

  • ImageFormat.Png

Explicación

Pregunta 8 de 50

1

Which format is the best choice to use if you want to save a pie chart that could be opened by a wide variety of applications?

Selecciona una de las siguientes respuestas posibles:

  • ImageFormat.Bmp

  • ImageFormat.Gif

  • ImageFormat.Jpeg

  • ImageFormat.Png

Explicación

Pregunta 9 de 50

1

What are the steps for adding text to an image?

Selecciona una de las siguientes respuestas posibles:

  • Create a Graphics object and a string object. Then call string.Draw.

  • Create a Graphics object, a Font object, and a Brush object. Then call Graphics.DrawString.

  • Create a Graphics object, a Font object, and a Pen object. Then call Graphics.DrawString.

  • Create a Bitmap object, a Font object, and a Brush object. Then call Bitmap.DrawString.

Explicación

Pregunta 10 de 50

1

Which class would you need to create an instance of to specify that a string should be centered when drawn?

Selecciona una de las siguientes respuestas posibles:

  • StringFormat

  • StringAlignment

  • FormatFlags

  • LineAlignment

Explicación

Pregunta 11 de 50

1

Which of the following commands would cause a string to be flush left?

Selecciona una de las siguientes respuestas posibles:

  • StringFormat.LineAlignment = Near

  • StringFormat.LineAlignment = Far

  • StringFormat.Alignment = Near

  • StringFormat.Alignment = Far

Explicación

Pregunta 12 de 50

1

You are developing an application that will add text to JPEG, PNG, and GIF image files. Which class should you use to allow you to edit any of those image formats?

Selecciona una de las siguientes respuestas posibles:

  • Metafile

  • Icon

  • Bitmap

  • Image

Explicación

Pregunta 13 de 50

1

Which of the following statements are TRUE about the .NET CLR? (Choose 4)

Selecciona una o más de las siguientes respuestas posibles:

  • It provides a language-neutral development & execution environment.

  • It ensures that an application would not be able to access memory that it is not authorized to access.

  • It provides services to run "managed" applications.

  • The resources are garbage collected.

  • It provides services to run "unmanaged" applications.

Explicación

Pregunta 14 de 50

1

Which of the following are valid .NET CLR JIT performance counters? (Choose 2)

Selecciona una o más de las siguientes respuestas posibles:

  • Total memory used for JIT compilation

  • Average memory used for JIT compilation

  • Number of methods that failed to compile with the standard JIT

  • Percentage of processor time spent performing JIT compilation

  • Percentage of memory currently dedicated for JIT compilation

Explicación

Pregunta 15 de 50

1

Which of the following statements is correct about Managed Code?

Selecciona una de las siguientes respuestas posibles:

  • Managed code is the code that is compiled by the JIT compilers.

  • Managed code is the code where resources are Garbage Collected.

  • Managed code is the code that runs on top of Windows.

  • Managed code is the code that is written to target the services of the CLR.

  • Managed code is the code that can run on top of Linux.

Explicación

Pregunta 16 de 50

1

Which of the following are NOT true about .NET Framework? (Choose 2)

Selecciona una o más de las siguientes respuestas posibles:

  • It provides a consistent object-oriented programming environment whether object code is stored and executed locally, executed locally but Internet-distributed, or executed remotely.

  • It provides a code-execution environment that minimizes software deployment and versioning conflicts.

  • It provides a code-execution environment that promotes safe execution of code, including code created by an unknown or semi-trusted third party.

  • It provides different programming models for Windows-based applications and Web-based applications.

  • It provides an event driven programming model for building Windows Device Drivers.

Explicación

Pregunta 17 de 50

1

Which of the following components of the .NET framework provide an extensible set of classes that can be used by any .NET compliant programming language?

Selecciona una de las siguientes respuestas posibles:

  • .NET class libraries

  • Common Language Runtime

  • Common Language Infrastructure

  • Component Object Model

  • Common Type System

Explicación

Pregunta 18 de 50

1

Which of the following jobs are NOT performed by Garbage Collector? (Choose 3)

Selecciona una o más de las siguientes respuestas posibles:

  • Freeing memory on the stack.

  • Avoiding memory leaks.

  • Freeing memory occupied by unreferenced objects.

  • Closing unclosed database collections.

  • Closing unclosed files.

Explicación

Pregunta 19 de 50

1

Which of the following .NET components can be used to remove unused references from the managed heap?

Selecciona una de las siguientes respuestas posibles:

  • Common Language Infrastructure

  • CLR

  • Garbage Collector

  • Class Loader

  • CTS

Explicación

Pregunta 20 de 50

1

Which of the following statements correctly define .NET Framework?

Selecciona una de las siguientes respuestas posibles:

  • It is an environment for developing, building, deploying and executing Desktop Applications, Web Applications and Web Services.

  • It is an environment for developing, building, deploying and executing only Web Applications.

  • It is an environment for developing, building, deploying and executing Distributed Applications.

  • It is an environment for developing, building, deploying and executing Web Services.

  • It is an environment for development and execution of Windows applications.

Explicación

Pregunta 21 de 50

1

Which of the following assemblies can be stored in Global Assembly Cache?

Selecciona una de las siguientes respuestas posibles:

  • Private Assemblies

  • Friend Assemblies

  • Shared Assemblies

  • Public Assemblies

  • Protected Assemblies

Explicación

Pregunta 22 de 50

1

Which of the following constitutes the .NET Framework? (Choose 2)

Selecciona una o más de las siguientes respuestas posibles:

  • ASP.NET Applications

  • CLR

  • Framework Class Library

  • WinForm Applications

  • Windows Services

Explicación

Pregunta 23 de 50

1

Code that targets the Common Language Runtime is known as

Selecciona una de las siguientes respuestas posibles:

  • Unmanaged

  • Distributed

  • Legacy

  • Managed Code

  • Native Code

Explicación

Pregunta 24 de 50

1

Which of the following statements is correct about the .NET Framework?

Selecciona una de las siguientes respuestas posibles:

  • .NET Framework uses DCOM for achieving language interoperability.

  • .NET Framework is built on the DCOM technology.

  • .NET Framework uses DCOM for making transition between managed and unmanaged code.

  • .NET Framework uses DCOM for creating unmanaged applications.

  • .NET Framework uses COM+ services while creating Distributed Applications.

Explicación

Pregunta 25 de 50

1

Which of the following is the root of the .NET type hierarchy?

Selecciona una de las siguientes respuestas posibles:

  • System.Object

  • System.Type

  • System.Base

  • System.Parent

  • System.Root

Explicación

Pregunta 26 de 50

1

Which of the following benefits do we get on running managed code under CLR? (Choose 4)
(АППЕЛЯЦИОННЫЙ ВОПРОС!)

Selecciona una o más de las siguientes respuestas posibles:

  • Type safety of the code running under CLR is assured.

  • It is ensured that an application would not access the memory that it is not authorized to access.

  • It launches separate process for every application running under it.

  • The resources are Garbage collected.

Explicación

Pregunta 27 de 50

1

Which of the following statements are correct about JIT? (Choose 3)

Selecciona una o más de las siguientes respuestas posibles:

  • JIT compiler compiles instructions into machine code at run time.

  • The code compiler by the JIT compiler runs under CLR.

  • The instructions compiled by JIT compilers are written in native code.

  • The instructions compiled by JIT compilers are written in Intermediate Language (IL) code.

  • The method is JIT compiled even if it is not called

Explicación

Pregunta 28 de 50

1

Which of the following are parts of the .NET Framework? (Choose 2)

Selecciona una o más de las siguientes respuestas posibles:

  • The Common Language Runtime (CLR)

  • The Framework Class Libraries (FCL)

  • Microsoft Published Web Services

  • Applications deployed on IIS

  • Mobile Applications

Explicación

Pregunta 29 de 50

1

Which one of the following classes are present System.Collections.Genericnamespace? (Choose 2)

Selecciona una o más de las siguientes respuestas posibles:

  • Stack

  • Tree

  • SortedDictionary

  • SortedArray

Explicación

Pregunta 30 de 50

1

For the code snippet shown below, which of the following statements are valid? public class Generic<T>{ public T Field; public void TestSub() { T i = Field + 1; } } class MyProgram { static void Main(string[] args) { Generic<int> gen = new Generic<int>(); gen.TestSub(); } }

Selecciona una de las siguientes respuestas posibles:

  • Addition will produce result 1.

  • Result of addition is system-dependent.

  • Program will generate run-time exception.

  • Compiler will report an error: Operator '+' is not defined for types T and int.

  • None of the above.

Explicación

Pregunta 31 de 50

1

Which of the following statements are valid about generics in .NET Framework? (Choose 2)

Selecciona una o más de las siguientes respuestas posibles:

  • Generics is a language feature.

  • We can create a generic class, however, we cannot create a generic interface in C#.NET.

  • Generics delegates are not allowed in C#.NET.

  • Generics are useful in collection classes in .NET framework.

  • None of All

Explicación

Pregunta 32 de 50

1

Which of the following statements is valid about generic procedures in C#.NET?

Selecciona una de las siguientes respuestas posibles:

  • All procedures in a Generic class are generic.

  • Only those procedures labeled as Generic are generic.

  • Generic procedures can take at the most one generic parameter.

  • Generic procedures must take at least one type parameter.

  • None of All.

Explicación

Pregunta 33 de 50

1

For the code snippet given below, which of the following statements is valid? public class Generic<T> { public T Field;} class Program { static void Main(string[ ] args) { Generic<String> g = new Generic<String>(); g.Field = "Hello"; Console.WriteLine(g.Field); }}

Selecciona una de las siguientes respuestas posibles:

  • It will print string "Hello" on the console.

  • Name Generic cannot be used as a class name because it's a keyword.

  • Compiler will give an error.

  • Member Field of class Generic is not accessible directly.

  • None of the above.

Explicación

Pregunta 34 de 50

1

For the code snippet given below, which of the following statements are valid? public class MyContainer<T> where T: IComparabte { // Insert code here } (Choose 2)

Selecciona una o más de las siguientes respuestas posibles:

  • Class MyContainer requires that it's type argument must implementIComparabte interface.

  • Type argument of class MyContainer must be IComparabte.

  • Compiler will report an error for this block of code.

  • This requirement on type argument is called as constraint

Explicación

Pregunta 35 de 50

1

For the code snippet given below, which of the following statements are valid? public class MyContainer<T> where T: class, IComparable { //Insert code here} (Choose 2)

Selecciona una o más de las siguientes respuestas posibles:

  • Class MyContainer requires that it's type argument must implementIComparable interface.

  • Compiler will report an error for this block of code.

  • There are multiple constraints on type argument to MyContainer class.

  • Class MyContainer requires that its type argument must be a reference type and it must implement IComparable interface.

Explicación

Pregunta 36 de 50

1

Which of the following statements is valid about advantages of generics?

Selecciona una de las siguientes respuestas posibles:

  • Generics shift the burden of type safety to the programmer rather than compiler.

  • Generics require use of explicit type casting.

  • Generics provide type safety without the overhead of multiple implementations.

  • Generics eliminate the possibility of run-time errors.

  • None of the above.

Explicación

Pregunta 37 de 50

1

Which of the following statements is correct about the C#.NET code snippet given below? interface IMyInterface { void fun1(); int fun2(); } class MyClass: IMyInterface { void fun1() { } int IMyInterface.fun2() { } }

Selecciona una de las siguientes respuestas posibles:

  • A function cannot be declared inside an interface.

  • A subroutine cannot be declared inside an interface.

  • A Method Table will not be created for class MyClass.

  • MyClass is an abstract class.

  • The definition of fun1() in class MyClass should be void IMyInterface.fun1().

Explicación

Pregunta 38 de 50

1

Which of the following can be declared in an interface? (Choose 3)

Selecciona una o más de las siguientes respuestas posibles:

  • Properties

  • Methods

  • Enumerations

  • Events

  • Structures

Explicación

Pregunta 39 de 50

1

Which of the following statements is correct about an interface used in C#.NET?

Selecciona una de las siguientes respuestas posibles:

  • One class can implement only one interface.

  • In a program if one class implements an interface then no other class in the same program can implement this interface.

  • From two base interfaces a new interface cannot be inherited.

  • Properties can be declared inside an interface.

  • Interfaces cannot be inherited.

Explicación

Pregunta 40 de 50

1

Which of the following statements is correct about Interfaces used in C#.NET?

Selecciona una de las siguientes respuestas posibles:

  • All interfaces are derived from an Object class.

  • Interfaces can be inherited.

  • All interfaces are derived from an Object interface.

  • Interfaces can contain only method declaration.

  • Interfaces can contain static data and methods.

Explicación

Pregunta 41 de 50

1

Which of the following statements is correct about an interface used in C#.NET?

Selecciona una de las siguientes respuestas posibles:

  • If a class implements an interface partially, then it should be an abstract class.

  • A class cannot implement an interface partially.

  • An interface can contain static methods.

  • An interface can contain static data.

  • Multiple interface inheritance is not allowed.

Explicación

Pregunta 42 de 50

1

Which of the following statements is correct about an interface?

Selecciona una de las siguientes respuestas posibles:

  • One interface can be implemented in another interface.

  • An interface can be implemented by multiple classes in the same program.

  • A class that implements an interface can explicitly implement members of that interface.

  • The functions declared in an interface have a body.

Explicación

Pregunta 43 de 50

1

Which of the following statements are correct about an interface in C#.NET? (Choose 3)

Selecciona una o más de las siguientes respuestas posibles:

  • A class can implement multiple interfaces.

  • Structures cannot inherit a class but can implement an interface.

  • In C#.NET, : is used to signify that a class member implements a specific interface.

  • An interface can implement multiple classes.

  • The static attribute can be used with a method that implements an interface declaration.

Explicación

Pregunta 44 de 50

1

Which of the following is the correct implementation of the interface given below? interface IMyInterface { double MyFun(Single i); }

Selecciona una de las siguientes respuestas posibles:

  • class MyClass { double MyFun(Single i) as IMyInterface.MyFun { // Some code }}

  • class MyClass { MyFun (Single i) As Double {// Some code } }

  • class MyClass: implements IMyInterface { double fun(Single si) implements IMyInterface.MyFun() { //Some code } }

  • class MyClass: IMyInterface { double IMyInterface.MyFun(Single i) { // Some code } }

Explicación

Pregunta 45 de 50

1

Which of the following statements is correct?

Selecciona una de las siguientes respuestas posibles:

  • When a class inherits an interface it inherits member definitions as well as its implementations.

  • An interface cannot contain the signature of an indexer.

  • Interfaces members are automatically public.

  • To implement an interface member, the corresponding member in the class must be public as well as static.

Explicación

Pregunta 46 de 50

1

Which of the following statements are correct about an interface used in C#.NET? (Choose 3)

Selecciona una o más de las siguientes respuestas posibles:

  • An interface can contain properties, methods and events.

  • The keyword must implement forces implementation of an interface.

  • Interfaces can be overloaded.

  • Interfaces can be implemented by a class or a struct.

  • Enhanced implementations of an interface can be developed without breaking existing code.

Explicación

Pregunta 47 de 50

1

Which of the following can implement an interface? (Choose 2)

Selecciona una o más de las siguientes respuestas posibles:

  • Data

  • Class

  • Enum

  • Structure

  • Namespace

Explicación

Pregunta 48 de 50

1

Which of the following statements is correct about the C#.NET code snippet given below? interface IMyInterface{ void fun1(); void fun2(); } class MyClass: IMyInterface { private int i; void IMyInterface.fun1() { // Some code } }

Selecciona una de las siguientes respuestas posibles:

  • Class MyClass is an abstract class.

  • Class MyClass cannot contain instance data.

  • Class MyClass fully implements the interface IMyInterface.

  • Interface IMyInterface should be inherited from the Object class.

  • The compiler will report an error since the interface IMyInterface is only partially implemented.

Explicación

Pregunta 49 de 50

1

Which of the following statements is correct about the C#.NET code snippet given below? interface IPerson{ String FirstName { get; set; } String LastName { get; set; } void Print(); void Stock(); int Fun(); }

Selecciona una de las siguientes respuestas posibles:

  • Properties cannot be declared inside an interface.

  • This is a perfectly workable interface.

  • The properties in the interface must have a body.

  • Subroutine in the interface must have a body.

  • Functions cannot be declared inside an interface.

Explicación

Pregunta 50 de 50

1

For the code snippet shown below, which of the following statements are valid? public class TestIndiaBix { public void TestSub<M> (M arg)
{ Console.Write(arg); }} class MyProgram { static void Main(string[]args) { TestIndiaBix bix = new TestIndiaBix(); bix.TestSub("Hello world "); bix.TestSub(4.2f); }}

Selecciona una de las siguientes respuestas posibles:

  • Program will compile and on execution will print: Hello world

  • A non generic class Hello cannot have generic subroutine.

  • Compiler will generate an error.

  • Program will generate a run-time exception.

  • None of all.

Explicación