C sharp NET/Texto Completo

De Wikilibros, la colección de libros de texto de contenido libre.

Esta es la versión para imprimir de C sharp NET.
  • Si imprimes esta página, o eliges la opción de Vista preliminar de impresión de tu navegador, verás que desaparecen este cuadro y los elementos de navegación de arriba y de la izquierda, pues no son útiles en una versión impresa.
  • Pulsando antes en Refrescar esta página te asegurarás de obtener los últimos cambios del libro antes de imprimirlo.
  • Para más información, puedes ver Wikilibros:Versión para imprimir.


Contenido


C sharp NET

El lenguaje C#

Los primeros rumores de que Microsoft estaba desarrollando un nuevo lenguaje de programación surgieron en 1998, haciendo referencia a un lenguaje que entonces llamaban COOL y que decían era muy similar a Java. En junio de 2000, Microsoft despejó todas las dudas liberando la especificación de un nuevo lenguaje llamado C#. A esto le siguió rápidamente la primera versión de prueba del entorno de desarrollo estándar (SDK) .NET, que incluía un compilador de C#. El nuevo lenguaje estaba diseñado por Anders Hejlsberg ( creador de Turbo Pascal y arquitecto de Delphi ), Scott Wiltamuth y Peter Golde. Entonces describieron el lenguaje como "...simple, moderno, orientado a objetos, de tipado seguro y con una fuerte herencia de C/C++".

Una muestra de esta nueva tecnología es el nuevo lenguaje de programación C#. Este nuevo lenguaje orientado a objetos con énfasis en internet se basa en las lecciones aprendidas de los lenguajes C, C++, Java y Visual Basic. Por ello se trata de un lenguaje que combina todas las cualidades que se pueden esperar de un lenguaje moderno (orientación a objetos, gestión automática de memoria, etc.) a la vez que proporciona un gran rendimiento.

En este curso intentaremos examinar las cualidades de este lenguaje desde lo más básico a lo más avanzado incluyendo la versión 2.0. Examinaremos paso a paso cómo crear poderosas aplicaciones de escritorio o basadas en web.

Tabla de Contenidos

  1. Capítulo 0: Breve introducción a los lenguajes de programación
  2. Capítulo 1: Introducción
  3. Capítulo 2: Primer programa
  4. Capítulo 3: Fundamentos del lenguaje
  5. Capítulo 4: Estructuras de control
  6. Capítulo 5: Introducción a las clases y objetos
  7. Capítulo 6: Herencia y Polimorfismo
  8. Capítulo 7: Sobrecargando operadores
  9. Capítulo 8: Estructuras
  10. Capítulo 9: Interfaces
  11. Capítulo 10: Estructuras de datos
  12. Capítulo 11: Cadenas y Expresiones regulares
  13. Capítulo 12: Manejo de excepciones
  14. Capítulo 13: Delegación y Eventos
  15. Capítulo 14: Creando Aplicaciones gráficas usando Windows.Forms
  16. Capítulo 15: Creando Aplicaciones gráficas usando Gtk# y Qyoto(Qt4)
  17. Capítulo 16: Accediendo a la información usando ADO.NET
  18. Capítulo 17: Programando Aplicaciones WEB con ASP.NET 2.0
  19. Capítulo 18: Programando Servicios del Web
  20. Capítulo 19: XML
  21. Capítulo 20: Ensamblados y Versiones
  22. Capítulo 21: Atributos y Reflexión
  23. Capítulo 22: Programando en Redes
  24. Capítulo 23: .NET y COM
  25. Capítulo 24: Creando aplicaciones multimedia SDK y DirectX
  26. Capítulo 25: OpenGL y Direct3D
  27. Capítulo 26: Utilizando Bases de Datos
  28. Capítulo 27: Solución a los problemas propuestos
  29. Capítulo 28: Manejo de puertos
  30. Capítulo 29: Sockets
  • Texto Completo
    Versión para imprimir de este libro

Pre-requisitos necesarios para este curso

Lo único que necesitáis para este curso es tener un compilador de C# y un entorno de ejecución de código gestionado. Los más utilizados son el mono, dotgnu y sdk de microsoft.

Autores

Editores principales (si has colaborado añade tu nombre a esta lista):

Fabian Seoane. Tutorial de MonoHispano, migración y editor.

David Cañar - Creación del libro, Capitulo 2 y varias porciones del capítulo 1, 3 y 4

Javier Hernández Sánchez - Creacion del capitulo 9 Interfaces

Sebastian Sasías - Revisión, ampliación y formalización de conceptos (en proceso)

Gustavo Novaro - Varios Para más detalles vea el historial.

Licencia


GNU Heckert Se autoriza la copia, la distribución y la modificación de este documento bajo los términos de la licencia de documentación libre GNU, versión 1.2 o cualquier otra que posteriormente publique la Fundación del Software Libre (Free Software Fundation); sin secciones invariantes (Unvariant Sections), textos de portada (Front-Cover Texts), ni textos de contraportada (Back-Cover Texts).

Se incluye una copia en inglés de esta licencia en el artículo Text of the GNU Free Documentation License.


Referencias

Este Wikilibro tiene extenso material tomado del tutorial de C# del proyecto MonoHispano (http://mono-hispano.org/tutoriales/csharp/).

Introduccion a los lenguajes

C sharp NET / Capítulo 0

Introduccion

C sharp NET / Capítulo 1

Primer Programa ¡Hola Mundo!

Versión para imprimir esta pagina

CAPÍTULO 2

Primer programa ¡Hola Mundo!

En un alarde de originalidad, empezaremos con un simple programa que desplegará la frase “¡Hola Mundo!”. Con este programa introduciremos las bases de nuestro estudio. Debido a que la plataforma .NET es independiente del sistema operativo en este libro procuraremos mantenernos imparciales en cuanto este asunto, eso si, cuando llegue el tiempo de compilar y ejecutar daremos ejemplos de como hacerlo tanto en Windows como en Linux (en otras plataformas como MacOS será lo mismo que en Linux).

Si estáis utilizando un entorno de desarrollo integrado debéis abrir un nuevo proyecto de consola en C#, escribir o copiar lo que se muestra en el ejemplo 2.1 y compilad el proyecto para ver su resultado. Si preferís programar con un editor de textos, abrid vuestro editor de texto favorito y grabad en un directorio conocido lo que se encuentra en el ejemplo 2.1 como Programa.cs, abrid una ventana de terminal (en linux) o una ventana de comandos (Ejecutar(Run) -> cmd) en Windows y compilad vuestro proyecto con el siguiente comando:

en linux con MONO(en el directorio donde habéis grabado vuestro programa):

mcs Programa.cs

en linux con dotGNU(en el directorio donde habéis grabado vuestro programa):

cscc -o Programa.exe Programa.cs

en Windows (en el directorio donde habéis grabado vuestro programa):

csc Programa.cs

de esta forma obtendréis vuestro primer programa. Para ejecutarlo simplemente escribid:

con MONO:

mono Programa.exe

con dotGNU:

ilsrun Programa.exe

o en Windows:

Programa


Ejemplo 2.1 Programa Hola Mundo

//Ejemplo 2.1 - Programa Hola Mundo
 
 
  class HolaMundo
  {
      static void Main()
      {
          string var="Mundo";
          System.Console.WriteLine ("Hola {0}!", var);
      }
  }


Analicemos paso a paso nuestro programa de ejemplo:

Comentarios

En la primera línea de nuestro programa encontramos lo siguiente: //Ejemplo 2.1 .... Esta línea es un ejemplo de comentarios. Un comentario es una parte en vuestro programa que será ignorado por el compilador.

Existen tres tipos de comentarios en C#. El primer tipo es comentario de un sola línea. El segundo es comentario de varias líneas. El tercer tipo es para crear documentación. Este último tipo de comentario lo estudiaremos en el capítulo 13 de este libro.

Los comentarios de una sola línea pueden ser incluidos en líneas independientes, en líneas que ya incluyen código para comentar sobre lo que hace esa línea o para comentar una línea de código que no necesitamos.

Los comentarios de varias líneas sirven para incluir muchas líneas de texto o código como un comentario. Tienen una marca de inicio que dice cuando empieza el comentario y una marca que indica el final de dicho comentario. La marca de inicio es /* y la marca para finalizar es */ Así por ejemplo tenemos:

 //Este es un ejemplo de comentarios de una línea
 
 /* 
    este comentario 
    abarca varias lineas
 */
 
class HolaMundo
{
     static void Main()
     {
       string var="Mundo";
       System.Console.WriteLine ("Hola {0}!", var); //Este comentario puede describir lo que esta función hace
       //System.Console.WriteLine ("y esta linea no la vamos a desplegar"); 
     }
}

Clases, Objetos y tipos

La esencia de la programación orientada a objetos es la creación de nuevos tipos. Un tipo es la representación de un componente (Pensado en un ordenador (un computador) que está compuesto de varios componentes). En programación un componente es algo que cumple una función. Por ejemplo, un componente puede ser un botón en un programa. En una aplicación podemos tener varios botones del mismo tipo como por ejemplo botones de Aceptar, Cancelar, etc. Porque son del mismo tipo estos botones tienen propiedades y comportamientos similares. Pueden tener propiedades como cambiar de "tamaño", "posición", etc. Las propiedades son las mismas pero los valores almacenados en sus atributos pueden ser diferentes. Por ejemplo, un botón puede tener tamaño 10 y otro tamaño 6. Podemos decir entonces que tenemos varias instancias del mismo componente (o varios botones del mismo tipo) con diferentes valores en sus atributos.

La programación orientada a objetos es esto. Crear componentes que puedan ser reusados. Así no tenemos que programar varios componentes que cumplan funciones similares sino solo uno que podrá llevar diferentes atributos y que podrá ser reproducido (o instanciado) tantas veces como lo necesitemos.

Como en varios lenguajes de programación orientado a objetos, en C# los tipos o componentes son definidos por una clase (class en inglés). Las diferentes reproducciones o instancias de un componente del mismo tipo se conoce como objetos. Posteriormente en nuestro estudio veremos que en C# hay más tipos además de las clases. Aprenderemos sobre enums, structs y delegates. Pero por el momento nos dedicaremos a las clases.

Como hemos visto en nuestro primer programa (Ejemplo 2.1), empezamos nuestro programa declarando el tipo de componente que vamos a utilizar (un componente de tipo class) y su nombre HolaMundo. Para declarar nuestro componente como una clase, primero introducimos la palabra clave class, y después el nombre de nuestro componente, después de lo cual declaramos las funciones que va a cumplir su comportamiento y sus propiedades. Todas las funciones, comportamiento y propiedades de nuestro componente (en este caso nuestra clase) deberán estar encerrados entre llaves { }. Las llaves delimitan el inicio y el final de dicho componente.

Métodos o Funciones

Los métodos o funciones son trozos de código que realizan una acción, esto es, toman unos argumentos y devuelven un valor. En C#, las funciones deben ser declaradas dentro de un objeto, normalmente dentro de una clase.

Las funciones normalmente llevan nombre que definen su función. Por ejemplo, la función WriteLine() de la clase Console como debéis suponer "Escribe una Linea en la consola". De forma similar se pueden declarar clases a las que se le añaden un número ilimitado de métodos. En nuestro ejemplo 2.1 la única función que hemos definido lleva el nombre de Main() la cual es una función especial que indica la entrada principal de ejecución de un programa. Cada programa en C# debe tener una función Main().

Crear nuevos métodos o funciones

Para declarar un método o función utilizamos el siguiente formato:

[entorno] tipo_a_retornar Nombre_de_la_Función ([tipo Argumento1, tipo Argumento2,...])
{
 //lineas de código
}
las palabras dentro de corchetes [] son partes opcionales

de acuerdo con nuestro ejemplo 2.1, la función Main() cumple con el formato establecido:

static void Main()
{
 //lineas de código
}
  • entorno: static
  • tipo_a_retornar: void
  • Nombre_de_la_Función: Main
  • Argumentos: ninguno

En nuestro ejemplo la función Main() tiene como entorno la palabra clave static y como tipo_a_retornar la palabra clave void. Cuando la función no retorna ningún tipo, utilizamos la palabra void. Más adelante veremos más tipos además de void. La palabra static también la veremos más adelante en nuestro estudio, por el momento debéis confiar en el ejemplo y utilizarla aún sin saber lo que hace.

Podemos añadir a nuestro componente o clase un ilimitado número de funciones. Por ejemplo, para añadir más funciones a nuestro primer ejemplo procederemos a crear una función que suma dos valores. Como ya habéis aprendido en esta sección, crearemos nuestra función de la forma establecida. Después del final de la función Main crearemos una función con entorno static que retorne el tipo int, que se llame Suma y que acepte dos argumentos de tipo int. Para hacerla funcionar vamos a llamarla desde nuestra función principal:

Ejemplo 2.2 - Añadiendo funciones a nuestro programa

 //Ejemplo 2.2 - Programa Hola Mundo con C# más adición
 
 namespace Programa1
 { 
   class HolaMundo
   {
     static void Main()
     {
       string var="Mundo";
       System.Console.WriteLine ("Hola {0}!", var);
       int num1 = 1;
       int num2 = 3;
       int resultado = Suma (num1, num2);
       System.Console.WriteLine ("{0}+{1} = {2}", num1, num2, resultado); 
     }
 
     static int Suma(int valor1, int valor2)
     {
       return (valor1+valor2);
     }
   }
 }

probad vuestro programa, compiladlo y ejecutadlo. El resultado será el siguiente:

Hola Mundo!
1 + 3 = 4

Ésta es una pequeña introducción a funciones, más adelante estudiaremos más detalladamente como crear y utilizar funciones.

Aplicaciones de consola

Las aplicaciones de consola no poseen una interfaz gráfica, no tienen botones o ventanas, poseen una interfaz basada simplemente en texto. El ejemplo que hemos realizado hasta ahora es una aplicación de consola que despliega texto en la pantalla, para ello hemos utilizado la función WriteLine.

Como habíamos visto en la introducción, la plataforma .NET posee más de 4000 componentes cada cual con diferentes funciones internas. En el caso de nuestro programa hemos usado la función WriteLine que se encuentra dentro del componente Console. Para poder hacer uso de funciones estáticas que se encuentran en otros componentes, en C# como en la mayoría de lenguajes de programación orientados a objetos, debemos especificar el nombre del componente en primer lugar seguido por un punto y a continuación en el nombre de la función. Es por esto que utilizamos la frase Console.WriteLine. Dentro del componente Console la plataforma .NET tiene disponibles muchísimas otras funciones que nos ayudan a diseñar programas de consola. El lenguaje C# esta orientado con el paradigma de objetos y hereda muchos elementos de C++.

Namespaces

Quizá algunos de vosotros os habréis preguntado ¿que significa la palabra System que está al inicio de cada programa?. Púes bien, System en este caso representa un Espacio de nombres (namespace en inglés).

Los espacios de nombres (namespaces) se crearon principalmente para dar más organización a los componentes. La plataforma .NET tiene incorporados muchísimos componentes y sería una tarea imposible tratar de memorizar todos los nombres de ellos para no repetirlos. Tarde o temprano querréis crear un componente y no sabréis si el nombre que queréis darle ya existe o no. Para evitarnos este problema y para poder distinguir a dónde pertenecen ciertos componentes se han creado los espacios de nombres.

Pongamos un ejemplo para comprender este concepto. Supongamos que deseamos crear varios componentes para una institución educativa que se compone de educación primaria y educación secundaria. ¿Cómo podríamos crear un componente que se llame Presidente si existen 2 presidentes que tienen funciones distintas uno para la sección primaria y otro para la sección secundaria? En este caso podríamos aplicar un espacio de nombres para poder crear los componentes Presidente que cumplen distintas funciones. Podríamos crear el espacio de nombres Primaria y dentro de éste el componente Presidente. De igual forma el espacio de nombres Secundaria y dentro de éste el componente Presidente cada uno componentes podrá tener definiciones distintas. Para acceder a las funciones de los componentes Presidente podríamos usar:

Primaria.Presidente.nombre_de_la_función();
y
Secundaria.Presidente.otra_función();

Cada una de las dos definiciones de Presidente son independientes, no tienen relación entre sí ya que pertenecen a dos espacios de nombre distintos.

De ésta forma podremos crear componentes y funciones con el nombre que deseemos siempre y cuando especifiquemos a qué espacio de nombres pertenecen.

De acuerdo con la línea de código estudiada: System.Console.WriteLine ("Hola {0}!", var); existe una función llamada WriteLine dentro del componente Console dentro del nombre de espacio System. Cualquier otro componente llamado Console dentro de otro espacio de nombres, es un componente diferente con funciones diferentes que quizás no posea la función WriteLine.

Algo importante que debemos notar es que los espacios de nombres pueden tener sub-espacios de nombres y estos a su vez sub-espacios de nombres. El objetivo de esto, como lo hemos dicho, es mantener una organización de los componentes. Los espacios de nombres, componentes y métodos se accederán de la misma forma como lo hemos visto a través de un punto.

La palabra clave using

En ciertos proyectos tendremos que usar cierto espacio de nombres muchas veces. Supongamos que estamos implementando un programa de consola y tenemos que usar el componente Console repetidamente. Una forma de ahorrarnos escribir System varias veces es especificar el espacio de nombres que vamos a usar al inicio de nuestro programa con la palabra clave using. Por ejemplo en nuestro ejemplo 2.2 si añadimos la línea de código using System; al inicio de nuestro programa, podemos llamar al componente Console sin escribir System al inicio:

Ejemplo 2.2 Modificado - La palabra clave using

 //Ejemplo 2.2 Modificado - La palabra clave ''using''
 
 using System;
 
 namespace Programa1
 { 
   class HolaMundo
   {
     static void Main()
     {
       string var="Mundo";
       Console.WriteLine ("Hola {0}!", var);
       int num1 = 1;
       int num2 = 3;
       int resultado = Suma (num1, num2);
       Console.WriteLine ("{0}+{1} = {2}", num1, num2, resultado); 
     }
     static int Suma(int valor1, int valor2)
     {
       return valor1+valor2;
     }
   }
 }

Comparando con nuestro ejemplo 2.2 original las líneas en negrita muestran esta ventaja.

Algo importante para tener en cuenta es que la palabra clave using no puede ser utilizada para ahorrarse el escribir el nombre de la clase. Por ejemplo la línea de código using System.Console es inválida y producirá errores de compilación.

Caracteres sensibles

C# como todos los lenguajes de programación derivados de C hace diferencia entre caracteres en mayúscula y caracteres en minúscula. Esto quiere decir que las palabras Using y using son distintas y por lo tanto no cumplen la misma función. Debido a esto debemos tener mucho cuidado cuando escribimos nuestros programas.

system.console.writeLine es diferente a system.Console.WriteLine y es diferente a System.Console.WriteLine que es el nombre de espacio, componente y método que C# incorpora para desplegar texto en la consola.

Finalizada esta pequeña introducción a nuestro primer programa en C#, pasamos al capítulo 3 en donde examinaremos mas profundamente los fundamentos de C#.

Versión para imprimir esta pagina

Fundamentos del lenguaje

C sharp NET / Capítulo 3

Estructuras de control

C sharp NET / Capítulo 4

Introduccion a las clases

C sharp NET / Capítulo 5

Herencia y polimorfismo

C sharp NET / Capítulo 6

Sobrecargando operadores

C sharp NET / Capítulo 7

Estructuras

C sharp NET / Capítulo 8

Interfaces

C sharp NET / Capítulo 9

Estructuras de datos

C sharp NET / Capítulo 10

Cadenas y expresiones regulares

C sharp NET / Capítulo 11

Manejo de excepciones

C sharp NET / Capítulo 12

Delegacion y eventos

C sharp NET / Capítulo 13

Creando Aplicaciones gráficas usando Windows.Forms

C sharp NET / Capítulo 14

Creando Aplicaciones gráficas usando Gtk

C sharp NET / Capítulo 15

Accediendo a la información usando ADO.NET

C sharp NET / Capítulo 16

Programando Aplicaciones WEB con ASP.NET 2.0

C sharp NET / Capítulo 17

Programando Servicios del Web

C sharp NET / Capítulo 18

XML

C sharp NET / Capítulo 19

Ensamblados y Versiones

C sharp NET / Capítulo 20

Atributos y Reflexión

C sharp NET / Capítulo 21

Programando en Redes

C sharp NET / Capítulo 22

.NET y COM

C sharp NET / Capítulo 23

Creando aplicaciones multimedia SDL y DirectX

C sharp NET / Capítulo 24

OpenGL y Direct3D

C sharp NET / Capítulo 25

Utilizando Bases de Datos

C sharp NET / Capítulo 26

Solucion a los problemas propuestos

C sharp NET / Capítulo 27

Patrones de diseño

C sharp NET / Capítulo 28

GNU Free Documentation License


Version 1.2, November 2002

Copyright (C) 2000,2001,2002  Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

0. PREAMBLE

The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others.

This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software.

We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference.

1. APPLICABILITY AND DEFINITIONS

This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law.

A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language.

A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them.

The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none.

The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words.

A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque".

Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only.

The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text.

A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition.

The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License.

2. VERBATIM COPYING

You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3.

You may also lend copies, under the same conditions stated above, and you may publicly display copies.

3. COPYING IN QUANTITY

If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects.

If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages.

If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public.

It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document.

4. MODIFICATIONS

You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version:

A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission.
B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement.
C. State on the Title page the name of the publisher of the Modified Version, as the publisher.
D. Preserve all the copyright notices of the Document.
E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices.
F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below.
G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice.
H. Include an unaltered copy of this License.
I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence.
J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission.
K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein.
L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles.
M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version.
N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section.
O. Preserve any Warranty Disclaimers.

If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles.

You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard.

You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one.

The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version.

5. COMBINING DOCUMENTS

You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers.

The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work.

In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements."

6. COLLECTIONS OF DOCUMENTS

You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects.

You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document.

7. AGGREGATION WITH INDEPENDENT WORKS

A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document.

If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate.

8. TRANSLATION

Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail.

If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title.

9. TERMINATION

You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.

10. FUTURE REVISIONS OF THIS LICENSE

The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/.

Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation.


Herramientas personales