Está en la página 1de 2

UNIVERSIDAD TECNOLÓGICA DE EL SALVADOR

FACULTAD DE INFORMATICA Y CIENCIAS APLICADAS


ESCUELA DE INFORMATICA
CATEDRA DE DESARROLLO DE SOFTWARE
ASIGNATURA: Programación I SEC. CICLO AULA NOTA FINAL
PROFESOR : Ing. Alex Jiménez
INSTRUCTOR : 02 02-2010 BJ-305
EVALUACION: 1ra 2da. 3ra. 4ta. 5ta
EVALUACION ORDINARIA DIFERIDA No. DE LISTA:

ALUMNO CARNET:

CARRERA: Ing. En sistemas Lic. En computación Técnico en Ing. De software FECHA:


NOTA: Los instructores tienen la suficiente autoridad para velar por el buen resultado de esta prueba cualquier consulta debe usted
realizarla durante los primeros treinta minutos después de iniciarse el examen.
ASISTENCIA TRABAJO/SEMINARIO PRACTICAS EXAMEN CORTO PARCIAL
00.0% 30.0% 00.0% 00.0% 70.0%
COMPETENCIA: Desarrollar aplicaciones cliente servidor con C# y SQL server.

Parte I 20%. Subraye la respuesta correcta.


1) Objeto principal para el modelo de impresión con .NET
a) PrintDocument b) PrintPreviewDialog c) PrintPage d) System.Drawing.Printing.
2) Evento que se activa cuando al momento que se desea imprimir o mostrar en vista previa:
a) PrintPage b) Document c) Object d) PrintPageEventArgs
3) Evento que se activa cuando al momento que se desea imprimir o mostrar en vista previa:
a) PrintPage b) Document c) Object d) PrintPageEventArgs
4) Propiedad que recibe un objeto de tipo PrintDocument:
a) PrintPage b) Document c) Object d) ShowDialog()
5) Método que imprime y/o dibuja texto:
a) Draw b) e.Graphics c) DrawText d) DrawString

Escriba el código C# para :

Parte II (40%)
Crear y guardar en el archivo de texto c:\MiNombre.txt, su nombre completo (nombres y apellidos), en una sólo
línea de texto.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using C = System.Console;
using System.IO;

namespace Archivo
{
class Program
{
static void Main(string[] args)
{
string Nombre="JOSUE BALTAZAR CRUZ MARQUEZ";
StreamWriter MiDocumento=new StreamWriter("C:\\MiDocumento.txt",
true);
MiDocumento.WriteLine(Nombre);//mediante la instancia MiDocumeto
llamo el metodo WriteLine el cual rerive los paraemtros de la variabel nombre
MiDocumento.Close();

}
}
}

Parte III (40%)


Leer el archivo de texto c:\MiNombre.txt, (creado en el paso anterior) y enviar su contenido al impresor.

La parte II puede obviarse si no sabe cómo solucionarlo y deducir que ya existe el archivo y solamente realizar la
parte III. (por supuesto que perderá el 40% de dicho ejercicio).

También podría gustarte