<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-3290494616775942046</atom:id><lastBuildDate>Wed, 06 Nov 2024 02:54:06 +0000</lastBuildDate><category>Csharp</category><category>Microsoft Visual Studio</category><category>Clases</category><category>.Net Framework</category><category>Aspectos Básicos</category><category>Controles</category><category>ADO.Net</category><category>Expresiones regulares</category><category>Instrucciones</category><category>Herencia</category><title>Solocsharp</title><description>Blog dedicado a los desarrolladores C# y amantes de la tegnologia .net</description><link>http://solocsharp.blogspot.com/</link><managingEditor>noreply@blogger.com (Ing.Ismael Medrano)</managingEditor><generator>Blogger</generator><openSearch:totalResults>34</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3290494616775942046.post-3542313454641806782</guid><pubDate>Sun, 14 Aug 2011 02:50:00 +0000</pubDate><atom:updated>2011-08-13T22:50:00.658-04:00</atom:updated><title>Eventos</title><description>Los Eventos son muy importantes, sumamente importantes de manera que les recomiendo que traten de la manera mas posible usarlos. Me explico, comunmente usamos el evento Click del mouse pero les recomiendo que vean todos los eventos que tienen cada uno de los controles y veran todas la locuras que podemos hacer con ellos jejejej . Aquí les mostrare una lista de algunos de los eventos del textbox con su definición, pero puede ver todos los eventos de cada uno de los controles seleccionandolo y luego haciendo click en esta parte:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWmRtbH2tUdh8ERYB1323Chb2yCyexTJ6FyHtA188afqz2P7o_SrfiRRkeAa-pCsMzTtp3_as-fSm73b-cFSAusAli9D1b4I-elZpObhrwO-YZ4G9-c5S-2YYNhL0Xyh0yq4L5VvF1hrEK/s1600/Sin+t%25C3%25ADtulo.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;206&quot; naa=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWmRtbH2tUdh8ERYB1323Chb2yCyexTJ6FyHtA188afqz2P7o_SrfiRRkeAa-pCsMzTtp3_as-fSm73b-cFSAusAli9D1b4I-elZpObhrwO-YZ4G9-c5S-2YYNhL0Xyh0yq4L5VvF1hrEK/s320/Sin+t%25C3%25ADtulo.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;seleccionan el control y en la parte derecha de la pantalla donde estan las propiedades como ves en la imagen das clic en este icono y se mostrara la de los eventos de ese control.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Eventos:&lt;br /&gt;
&lt;br /&gt;
KeyPress: ocurre cuando el componente tiene el foco y el usuario presiona y suelta una tecla.&lt;br /&gt;
KeyDown: ocurre cuando el componente tiene el foco y el usuario presiona una tecla.&lt;br /&gt;
Leave: ocurre cuando el componente pierde el foco.&lt;br /&gt;
TextChanged: ocurre cuando el texto del componente es cambiado.&lt;br /&gt;
y así hay muchos otros más. &lt;br /&gt;
Ahhh.... recuerden que todos los componentes tienen sus eventos, checkeenlos y prueben y verán. &lt;br /&gt;
Saludos!!</description><link>http://solocsharp.blogspot.com/2011/08/eventos.html</link><author>noreply@blogger.com (Ing.Ismael Medrano)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWmRtbH2tUdh8ERYB1323Chb2yCyexTJ6FyHtA188afqz2P7o_SrfiRRkeAa-pCsMzTtp3_as-fSm73b-cFSAusAli9D1b4I-elZpObhrwO-YZ4G9-c5S-2YYNhL0Xyh0yq4L5VvF1hrEK/s72-c/Sin+t%25C3%25ADtulo.png" height="72" width="72"/><thr:total>3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3290494616775942046.post-7360194032826939773</guid><pubDate>Sat, 13 Aug 2011 15:13:00 +0000</pubDate><atom:updated>2011-08-13T11:13:15.077-04:00</atom:updated><title>llenar combo con query</title><description>&lt;span style=&quot;font-family: Times, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;Saludos, aquí les traigo un código para cargar un combobox con un query. Esta función trate de hacerla lo más sencilla posible y lo más genérica posible para que a la hora de crear un proyecto no necesites crear una función para llenar cada combo del proyecto, sino&amp;nbsp;que como&amp;nbsp;recordarnos estamos en programación orientada a objeto&amp;nbsp; y lo adecuado es hacer las funciones lo más genericas posibles, dirán porque? buenoo.. se la respondere con una pregunta&amp;nbsp; jejeje.&amp;nbsp;Como&amp;nbsp;lo harias si estas desarrollando&amp;nbsp;un proyecto de 20 formularios (y&amp;nbsp;son pocos jijijij)&amp;nbsp;en donde cada uno tenga 2 combos, serían en total 40 combos, como lo harías? 40 funciones o una genérica?... Aquí esta el código.. sería así: &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;void&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt; &lt;span style=&quot;color: black;&quot;&gt;LlenaCombo&lt;/span&gt;(&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;ComboBox&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt; &lt;span style=&quot;color: black;&quot;&gt;cbox,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;string&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;query,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;string&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: x-small;&quot;&gt; Dmember,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;string&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; Vmember)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;clsConexion&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt; &lt;span style=&quot;color: black;&quot;&gt;cx =&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;new&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;clsConexion&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;DataSet&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; ds =&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;new&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;DataSet&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;ds = cx.retornarDataSet(query); //mi función para ejecutar el query y lo carga en un dataset&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;cbox.DataSource = ds.Tables[0];&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;cbox.DisplayMember = Dmember;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;cbox.ValueMember = Vmember;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Como pueden ver, la funcion recibe 4 parametros(argumentos):&lt;br /&gt;
combobox cbox: el combo a cargar&lt;br /&gt;
string query: el string que contiene nuestra consulta&lt;br /&gt;
string Dmember: el campo que seria el DisplayMember(propiedad del combo... ver)&lt;br /&gt;
string Vmember: el campo que seria el ValueMember(propiedad del combo... ver)&lt;br /&gt;
&lt;br /&gt;
Con esta funcion solo necesitamos llamarla y pasarle los parametros cada vez que se necesite cargar un combo y no tendríamos algo como esto que vi en un lugar por ahí llenacomboPaciente, llenacomboProducto,etc... &amp;nbsp;que no es que esta mal porque funciona igual pero generico te ahorra tiempo.&lt;br /&gt;
&quot;OJO&quot; En este caso &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;estoy llenando el combo utilizando un dataset pero también podría ser con un DataReader. See ya around&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;</description><link>http://solocsharp.blogspot.com/2011/08/llenar-combo-con-query.html</link><author>noreply@blogger.com (Ing.Ismael Medrano)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3290494616775942046.post-2043340573617157687</guid><pubDate>Sat, 13 Aug 2011 15:10:00 +0000</pubDate><atom:updated>2011-08-13T11:10:07.579-04:00</atom:updated><title></title><description>&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Saludos, Les quiero mostrar dos cosas a la vez, una función para limpiar los campos que utilízo luego de que registro un formulario en la base de datos. Es decir, despues que lleno el formulario y lo envio a la base de datos, lo limpio con esta función dejando todos los textboxes y MaskedTextBox(textbox enmascarado)&amp;nbsp;en blanco. &lt;/span&gt;&lt;br /&gt;
esta es la función llamada LimpiarCampos y le paso el group box el cual quiero limpiar todos los textboxes que esten dentro de el.&lt;br /&gt;
&lt;span style=&quot;color: grey; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: x-small;&quot;&gt;///&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;summary&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: x-small;&quot;&gt;///&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: x-small;&quot;&gt; FUNCION PARA LIMPIAR TODOS LOS CAMPOS DENTRO DEL GROUPBOX ESPECIFICADO&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: x-small;&quot;&gt;///&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;/summary&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: x-small;&quot;&gt;///&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;param name=&quot;Gbox&quot; /&gt;&lt;/param&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;void&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: x-small;&quot;&gt; LimpiarCampos(&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;GroupBox&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; Gbox)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; foreach&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: x-small;&quot;&gt; (&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;Control&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: x-small;&quot;&gt; c &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;in&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt; &lt;span style=&quot;color: black;&quot;&gt;Gbox.Controls&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;if&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; (c&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;is&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;TextBox&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;) c.Text = &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; foreach&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt; &lt;span style=&quot;color: black;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;Control&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt; &lt;span style=&quot;color: black;&quot;&gt;c&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;in&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; Gbox.Controls)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;if&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt; &lt;span style=&quot;color: black;&quot;&gt;(c &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;is&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: x-small;&quot;&gt;MaskedTextBox&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;) c.Text = &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: white; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;como ven utilizo foreach que significa (por cada)... entonces...por cada control que haya en Gbox, si es textbox limpio el texto y hago lo mismo&amp;nbsp;si es&amp;nbsp;maskedtextbox.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;Lo segundo es el comentario la función.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;/// &lt;summary&gt;&amp;nbsp; esto se genera cuando escribimos 3 slash consecutivos arriba de una función como esta en el ejemplo.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;Esto&amp;nbsp;nos muestra como un tooltip cuando llamamos la función y nos muestra la definición que le pusimos. Esto viene siendo como una propiedad de la función donde se muestre el texto que pongas para identificarla. Vean en esta imagen lo que les digo:&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij_Hf8TuiCpwxVXBVHJuriyqLAyzIYNzUtMcHZuAgPoEwSQrtFlga9v-WFvB0K7N2zoZwVQAudv1t8V8ny5M121cQMVYTyyf1kMOuGP20TBNi3Zs6AP2vs5QSV0ZiRV1YGY1zSvlY6Kd4c/s1600/Sin+t%25C3%25ADtulo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; naa=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij_Hf8TuiCpwxVXBVHJuriyqLAyzIYNzUtMcHZuAgPoEwSQrtFlga9v-WFvB0K7N2zoZwVQAudv1t8V8ny5M121cQMVYTyyf1kMOuGP20TBNi3Zs6AP2vs5QSV0ZiRV1YGY1zSvlY6Kd4c/s1600/Sin+t%25C3%25ADtulo.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;color: black;&quot;&gt;Como dirían mis amigos los mexicanos, muy chido! jejejee.&lt;/span&gt;</description><link>http://solocsharp.blogspot.com/2011/08/saludos-les-quiero-mostrar-dos-cosas-la.html</link><author>noreply@blogger.com (Ing.Ismael Medrano)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij_Hf8TuiCpwxVXBVHJuriyqLAyzIYNzUtMcHZuAgPoEwSQrtFlga9v-WFvB0K7N2zoZwVQAudv1t8V8ny5M121cQMVYTyyf1kMOuGP20TBNi3Zs6AP2vs5QSV0ZiRV1YGY1zSvlY6Kd4c/s72-c/Sin+t%25C3%25ADtulo.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3290494616775942046.post-1802364736209608272</guid><pubDate>Wed, 22 Sep 2010 16:49:00 +0000</pubDate><atom:updated>2010-09-22T12:49:00.337-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Csharp</category><title>Programar textbox numerico</title><description>Algo bien importante para mantener control de escritura sobre los campos de un form y evitar errores es programar nuestros TextBoxes ya sean Numericos, solo letras, etc. Existen controles con propiedades definidas que nos permiten realizar esta tarea pero hoy le mostrare como hacerlo manualmente, programandolo que solo reciba valores numericos. Veamos:&lt;br /&gt;
&lt;br /&gt;
// para esto utilizamos&amp;nbsp;el evento&amp;nbsp;KeyPress de nuestro textbox.&lt;br /&gt;
// Utilizaremos código ascii para identificar cada caracter que sera válido o no&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;private void txtN1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;if (((e.KeyChar) &amp;lt; 48 &amp;amp;&amp;amp; e.KeyChar != 8) e.KeyChar &amp;gt; 57 )&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;MessageBox.Show(&quot;Sólo se permiten Números&quot;); &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;e.Handled = true;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Explíco: &lt;br /&gt;
Este evento maneja un objeto &#39;e&#39; que es el codigo ascii de&amp;nbsp;cada&amp;nbsp; tecla que presionamos &lt;br /&gt;
cuando&amp;nbsp;tengamos el foco&amp;nbsp;sobre el textbox.&lt;br /&gt;
En el if preguntamos lo siguiente;&lt;br /&gt;
Si&amp;nbsp;e.KeyChar &amp;lt; 48, diferente de 8 y &amp;gt; 57&amp;nbsp; &lt;br /&gt;
// si buscan la tabla de códigos ascii podran ver que los números del 0 al 9 estan entre los &lt;br /&gt;
//codigos ascii 48 y 57 es decir, los códigos ascii de los números del&amp;nbsp;0 al 9 son del 48 al 57. &lt;br /&gt;
// el 8 es el código ascii del BackSpace para en caso de que se necesite borrar se le permita&lt;br /&gt;
//al usuario.&lt;br /&gt;
Ahí esta, si el código ascii de el caracter que escribes en el textbox no cumple con ningunas&lt;br /&gt;
de las condiciones especificadas en el IF, significa que ni es número, ni es la tecla BackSpace&lt;br /&gt;
y te muestro un mensaje &quot;Solo se aceptan números&quot; etc.&lt;br /&gt;
Recuerden que utilizando los códigos ascii podemos controlar la&lt;br /&gt;
escritura sobre nuestros textboxes. Tambien recuerden que todo ese código va dentro de&lt;br /&gt;
del evento KeyPress del textbox.&amp;nbsp;Espero le haya sido útil.</description><link>http://solocsharp.blogspot.com/2010/09/programar-textbox-numerico.html</link><author>noreply@blogger.com (Ing.Ismael Medrano)</author><thr:total>5</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3290494616775942046.post-5597140417460013136</guid><pubDate>Sun, 29 Aug 2010 16:30:00 +0000</pubDate><atom:updated>2010-08-29T12:30:00.316-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Expresiones regulares</category><title>Usando expresiones regulares en un ambiente de escritorio (Win32)</title><description>Lo primero que debemos de hacer es importar la libreria &amp;nbsp;System.Text.RegularExpressions, la cual nos va a permitir utilizar las propiedades de las expresiones regulares. Entonces... tenemos una expresion regular por ejemplo: &amp;nbsp;// esta&amp;nbsp;expresión&amp;nbsp;nos sirve para validar correos&amp;nbsp;electrónicos&lt;br /&gt;
&lt;br /&gt;
@&quot;^(([\w-]+\.)+[\w-]+|([a-zA-Z]{1}|[\w-]{2,}))@&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;+ @&quot;((([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;+ @&quot;([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;[0-9]{1,2}|25[0-5]|2[0-4][0-9])){1}|&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;+ @&quot;([a-zA-Z]+[\w-]+\.)+[a-zA-Z]{2,4})$&lt;br /&gt;
&lt;br /&gt;
Declaramos una variable que contenga la&amp;nbsp;expresión&amp;nbsp;:&lt;br /&gt;
&lt;br /&gt;
public const string ExpresionReg =&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @&quot;^(([\w-]+\.)+[\w-]+|([a-zA-Z]{1}|[\w-]{2,}))@&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;+ @&quot;((([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;+ @&quot;([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;[0-9]{1,2}|25[0-5]|2[0-4][0-9])){1}|&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;+ @&quot;([a-zA-Z]+[\w-]+\.)+[a-zA-Z]{2,4})$&quot;;&lt;br /&gt;
&lt;br /&gt;
Luego creamos un&amp;nbsp;método&amp;nbsp;para validar Email&amp;nbsp;,&amp;nbsp;así:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public bool ValidarEmail(string Email)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (Email != null)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return Regex.IsMatch(Email, ExpresionReg);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return false;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
string Email sera igual al textbox.text donde escribiremos el Email.&lt;br /&gt;
Luego usamos la propiedad Regex.IsMatch que recibe dos parametros, Email (la variable que contiene el Email que necesitamos validar) y ExpressionReg (la&amp;nbsp;expresión&amp;nbsp;regular que utilizaremos para evaluar la variable).&lt;br /&gt;
De esa forma utilizamos expresiones regulares en un ambiente Win32 aunque&amp;nbsp;también&amp;nbsp;contamos con textboxes enmascarados, los cuales nos facilitan las validaciones con algunas expresiones regulares, prefiero irme por el lado manual &amp;nbsp;jiji... asi tenemos la libertad de validar&amp;nbsp;muchísimas&amp;nbsp;otras cosas mas y de diferentes maneras. &amp;nbsp;Espero le haya sido&amp;nbsp;útil.</description><link>http://solocsharp.blogspot.com/2010/08/usando-expresiones-regulares-en-un.html</link><author>noreply@blogger.com (Ing.Ismael Medrano)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3290494616775942046.post-6510338702255877301</guid><pubDate>Thu, 26 Aug 2010 09:50:00 +0000</pubDate><atom:updated>2010-08-25T18:14:24.087-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Expresiones regulares</category><title>Validar fecha con formato MM-DD-YYYY</title><description>Expresión:(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d&lt;br /&gt;
Esta expresion nos permite validar una fecha con el formato MM-DD-YYYY. Ahora veamos un ejemplo de como podemos utilizarlo en una clase en Csharp trabajando en un ambiente Web:&lt;br /&gt;
&lt;br /&gt;
Para esto debemos utilizar primeramente un objeto RegularExpressionValidator de nuestros controles Asp que nos provee Vstudio en el grupo de controles llamado Validation ubicado en el toolbox. Lo arrastramos y verificamos su propiedades:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9pk3ANe_acizCgSwBMn0LOBTaRfYe6Jsc5tqoGuwx_ek1bstIsk-c2VGURUCRbyl0vAWjzsqaQ3KQsGUeYbUBaC5wlpzjm7-p33f6wkxtB2D5ctjOTB3ApF_-eseV8OwtqI_-O31zyvOd/s1600/regularex.bmp&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9pk3ANe_acizCgSwBMn0LOBTaRfYe6Jsc5tqoGuwx_ek1bstIsk-c2VGURUCRbyl0vAWjzsqaQ3KQsGUeYbUBaC5wlpzjm7-p33f6wkxtB2D5ctjOTB3ApF_-eseV8OwtqI_-O31zyvOd/s640/regularex.bmp&quot; width=&quot;283&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Aquí&amp;nbsp;tenemos una propiedad importante llamada ControlToValidate que es donde especificamos que control es que vamos a validar, recuerden especificarlo. Luego tenemos Display, yo uso siempre Dynamic por que como su nombre lo dice... es dinamico. Luego tenemos la propiedad ErrorMessage que es el mensaje de error que deseamos mostrar cuando el control valide y le escritura sea incorrecta. Seguimos con ValidationExpression, es la propiedad donde escribimos o seleccionamos una expresion regular. El control nos facilita algunas expresiones regulares como para validar E-mails, Telefonos entre otros.&lt;br /&gt;
Hacemos clic en el boton de la propiedad ValidationExpression y aparecera un cuadro con las opciones de expresiones regulares disponibles y la opcion de escribir una personalizada u otra que necesitemos, ahi escribimos nuestra expresion regular:&lt;br /&gt;
(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d.&lt;br /&gt;
&lt;br /&gt;
Validation Group es la&amp;nbsp;próxima&amp;nbsp;propiedad que modificamos y ponemos un 1. Ahora para que todo esto funcione debemos de llamar el&amp;nbsp;método&amp;nbsp;Page.Validate() para que los controles de validation que estemos utilzando funcionen correctamente. Luego con un if(page.Isvalid()) ponemos lo que deseamos&amp;nbsp;así&amp;nbsp;por ejemplo:&lt;br /&gt;
&lt;br /&gt;
Validate();&lt;br /&gt;
if(page.isvalid())&lt;br /&gt;
{//si es valido pasar a otra pagina&lt;br /&gt;
response.redirect(&quot;pagina.aspx&quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Luego les&amp;nbsp;estaré&amp;nbsp;facilitando mas expresiones regulares. Espero le haya sido&amp;nbsp;útil.</description><link>http://solocsharp.blogspot.com/2010/08/validar-fecha-con-formato-mm-dd-yyyy.html</link><author>noreply@blogger.com (Ing.Ismael Medrano)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9pk3ANe_acizCgSwBMn0LOBTaRfYe6Jsc5tqoGuwx_ek1bstIsk-c2VGURUCRbyl0vAWjzsqaQ3KQsGUeYbUBaC5wlpzjm7-p33f6wkxtB2D5ctjOTB3ApF_-eseV8OwtqI_-O31zyvOd/s72-c/regularex.bmp" height="72" width="72"/><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3290494616775942046.post-2012239832939306484</guid><pubDate>Tue, 24 Aug 2010 15:50:00 +0000</pubDate><atom:updated>2010-08-24T11:50:01.082-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Csharp</category><title>Problema con el paging del Gridview!</title><description>Esto le ha pasado a mucha gente que conozco y hasta a mi&amp;nbsp;también, como sabemos el GridView tiene una propiedad que lleva como nombre paging &quot;paginación&quot; la cual nos permite paginar el contenido del GridView como queramos ya sea por cada 10 registros 20, 30 etc. Una vez estamos utilizando paging si nuestro GridView lo populamos con un Dataset nos&amp;nbsp;dará&amp;nbsp;un error cuando intentemos cambiar de pagina en nuestro GridView. Yo luego de cansarme de buscar en internet como resolver ese error que tanto me fastidio lol... lamentablemente.. me forzaron a utilizar LinQ porque es de la&amp;nbsp;única&amp;nbsp;manera que no me daba error. Aun sigo buscando otra&amp;nbsp;solución&amp;nbsp;porque se que la hay &amp;nbsp;lol. Saludos!</description><link>http://solocsharp.blogspot.com/2010/08/problema-con-el-paging-del-gridview.html</link><author>noreply@blogger.com (Ing.Ismael Medrano)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3290494616775942046.post-4389470072923547534</guid><pubDate>Fri, 09 Jul 2010 08:58:00 +0000</pubDate><atom:updated>2010-07-09T04:58:00.176-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Csharp</category><title>Pasar datos de un DatagridView a un textbox</title><description>SALUDOS, en este post le mostrare un&amp;nbsp;método&amp;nbsp;para pasar datos de un registro desde un datagridview a un textbox . Necesitamos 3 argumentos:&lt;br /&gt;
1- El datagrid de donde seleccionaremos el registro. 2- El textbox donde mostraremos el valor deseado.&lt;br /&gt;
3- string Columna, es el nombre del campo que deseamos pasar al textbox. Veamos el&amp;nbsp;método:&lt;br /&gt;
&lt;br /&gt;
public void Pasarcampo(DataGridView midgv, TextBox txb, string columna)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;// especifico que campo de la fila que este seleccionada vamos a pasar al textbox&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; txb.Text = midgv.Rows[midgv.CurrentRow.Index].Cells[columna].Value.ToString();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
midgv.Rows : hace referencia a una fila del grid.&lt;br /&gt;
[midgv.CurrentRow.Index] : &amp;nbsp;especifica que fila tenemos seleccionada.&lt;br /&gt;
.Cells[columna].Value : Se refiere al valor de la celda que tenemos seleccionada en el grid, en donde columna es el nombre de la celda o campo.&lt;br /&gt;
ToString() &amp;nbsp;que es para convertir el valor del resultado en string para poder asignarlo a la propiedad text de nuestro textbox.&lt;br /&gt;
Lo guardamos en una clase, por ejemplo... &amp;nbsp;clase utilidad.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Una forma de usarlo seria la siguiente:&lt;br /&gt;
&lt;br /&gt;
utilidad u = new utilidad();&lt;br /&gt;
&lt;br /&gt;
u.Pasarcampo(&lt;b&gt;Midatagrid,mitextbox,&quot;micolumna&quot;&lt;/b&gt;);&lt;br /&gt;
&lt;br /&gt;
Ya esta. con esta linea implementas el&amp;nbsp;método&amp;nbsp;y lo que sucede es lo siguiente:&lt;br /&gt;
de Midatagrid, se selecciona la columna &quot;micolumna&quot; de la fila seleccionada y la muestro en mitexbox.&lt;br /&gt;
Si quieres pasar varios campos o todo u registro, hazlo de esta forma:&lt;br /&gt;
&lt;br /&gt;
u.Pasarcampo(&lt;b&gt;Midatagrid,mitextbox1,&quot;micolumna1&quot;&lt;/b&gt;);&lt;br /&gt;
u.Pasarcampo(&lt;b&gt;Midatagrid,mitextbox2,&quot;micolumna2&quot;&lt;/b&gt;);&lt;br /&gt;
u.Pasarcampo(&lt;b&gt;Midatagrid,mitextbox3,&quot;micolumna3&quot;&lt;/b&gt;);&lt;br /&gt;
u.Pasarcampo(&lt;b&gt;Midatagrid,mitextbox4,&quot;micolumna4&quot;&lt;/b&gt;);&lt;br /&gt;
&lt;br /&gt;
etc.. &amp;nbsp;Espero haya sido&amp;nbsp;útil.</description><link>http://solocsharp.blogspot.com/2010/07/pasar-datos-de-un-datagridview-un.html</link><author>noreply@blogger.com (Ing.Ismael Medrano)</author><thr:total>34</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3290494616775942046.post-7504303701783012016</guid><pubDate>Mon, 14 Jun 2010 16:40:00 +0000</pubDate><atom:updated>2010-06-14T12:40:00.175-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Aspectos Básicos</category><title>Cada elemento tiene su roll</title><description>Cada elemento tiene su roll? si, eso es que cuando programamos debemos tener en cuenta que cada elemento del programa tiene su roll o responsabilidad y no debemos de ligarlos con otros, este es un caso de un manejo inadecuado de los roles o responsabilidades de los elementos de nuestras aplicaciones:&amp;nbsp;&lt;div&gt;&lt;br /&gt;
&lt;div&gt;Muchas veces colocamos dentro de nuestros&amp;nbsp;métodos&amp;nbsp;la llamada del MessageBox lo cual no debe ser realizado desde la clase sino desde el form, en este caso es responsabilidad del form y no de la clase.&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;Este tipo de acciones pueden afectar el performance de las aplicaciones, pero seria&amp;nbsp;también&amp;nbsp;por&amp;nbsp;cuestión&amp;nbsp;de&amp;nbsp;ética&amp;nbsp;, profesionalismo y&amp;nbsp;organización&amp;nbsp;del&amp;nbsp;código. Si nos enfocamos en darle a cada elemento un enfoque de sus responsabilidades, entonces&amp;nbsp;tendríamos&amp;nbsp;una&amp;nbsp;aplicación&amp;nbsp;mas flexible en&amp;nbsp;términos&amp;nbsp;de funcionalidad ya que cada elemento se&amp;nbsp;empeñaría&amp;nbsp;en hacer su trabajo y todo sería más&amp;nbsp;ágil. Espero que hayan disfrutado del post, nos veremos pronto!&amp;nbsp;&lt;/div&gt;</description><link>http://solocsharp.blogspot.com/2010/06/cada-elemento-tiene-su-roll.html</link><author>noreply@blogger.com (Ing.Ismael Medrano)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3290494616775942046.post-1576627364053137668</guid><pubDate>Sun, 16 May 2010 19:40:00 +0000</pubDate><atom:updated>2010-05-16T15:40:00.131-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Controles</category><title>Mostrar Icono de aplicación en el área de notificación, al lado de la hora del sistema, No en la barra de tareas!</title><description>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;Seguimos con los controles de Vstudio, esta vez trabajermos con el NotifyIcon del ToolBox:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiPR24jp_QqJ-CiLfHnBCJX3y1Bl3AngAt7ofOhmx98PsDE2JUkx1Wb2sVezUyBlRSn5OU7s-Xu2RKWmn7bi9Ee15O0leOlRbEaAR1HDSDk2ZyLNQVhY6DRT1Mj2Zl0_x_CCQFsCNyCBpI/s1600/notifyIcon.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;162&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiPR24jp_QqJ-CiLfHnBCJX3y1Bl3AngAt7ofOhmx98PsDE2JUkx1Wb2sVezUyBlRSn5OU7s-Xu2RKWmn7bi9Ee15O0leOlRbEaAR1HDSDk2ZyLNQVhY6DRT1Mj2Zl0_x_CCQFsCNyCBpI/s400/notifyIcon.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;Modificamos la propiedad Nombre, poniendole el nombre que queremos mostrar al pasar el cursor sobre el icono y&amp;nbsp;también&amp;nbsp;seleccionamos una imagen que sera el icono(propiedad Icon) que mostraremos en el area de&amp;nbsp;notificación. Recuerden&amp;nbsp;también&amp;nbsp;cambiar la propiedad ShowIcon ponerla true y la propiedad ShowIn taskbar ponerla false. Esta ultima es&amp;nbsp;cuestión&amp;nbsp;de&amp;nbsp;estética&amp;nbsp;para cuando la&amp;nbsp;aplicación&amp;nbsp;este instalada y&amp;nbsp;ejecutándose&amp;nbsp;no se muestre en la barra de tareas, si no en el&amp;nbsp;área&amp;nbsp;de&amp;nbsp;notificación, como ocurre con los antivirus por ejemplo. Este ultimo(ShowIn taskBar) es&amp;nbsp;cuestión&amp;nbsp;de gusto personal. Ahora compilen la&amp;nbsp;aplicación&amp;nbsp;y&amp;nbsp;verán&amp;nbsp;el icono que seleccionaron para la&amp;nbsp;aplicación&amp;nbsp;cerca del reloj en el&amp;nbsp;área&amp;nbsp;de&amp;nbsp;notificación. Le da un toque especial, no? je jee &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Esto es todo por ahora, seguiremos probando los controles y sus propiedades más adelante. Espero hayan disfrutado del post!&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;</description><link>http://solocsharp.blogspot.com/2010/05/mostrar-icono-de-aplicacion-en-el-area.html</link><author>noreply@blogger.com (Ing.Ismael Medrano)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiPR24jp_QqJ-CiLfHnBCJX3y1Bl3AngAt7ofOhmx98PsDE2JUkx1Wb2sVezUyBlRSn5OU7s-Xu2RKWmn7bi9Ee15O0leOlRbEaAR1HDSDk2ZyLNQVhY6DRT1Mj2Zl0_x_CCQFsCNyCBpI/s72-c/notifyIcon.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3290494616775942046.post-560904225816859112</guid><pubDate>Tue, 11 May 2010 07:40:00 +0000</pubDate><atom:updated>2010-05-11T03:40:00.295-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Controles</category><title>Propiedades del MessageBox</title><description>Como hemos visto, Visual Studio nos provee una serie de controles para facilitarnos el trabajo de la UI ya que muchos para no decir la&amp;nbsp;mayoría&amp;nbsp;de los programadores nos enfocamos mas en el&amp;nbsp;código&amp;nbsp;funcional que en el diseño y por tal&amp;nbsp;razón&amp;nbsp;no somos muy buenos en&amp;nbsp;cuestión&amp;nbsp;de diseño, pues dentro de esos controles tenemos uno que se llama MessageBox y que como su nombre lo indica es una caja de mensajes que utilizamos para mostrar mensajes de&amp;nbsp;confirmación o de lo que queramos, al cual le podemos modificar algunas de sus propiedades ,veamos un ejemplo:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGTJZVWl_247qvrPaAQP3q_m72XjGbwZ1MUvtmu3VZd7rGnFvC0zUwlIXG-rgv8aKVZDXvsfOKKziTw7gRvruiw81knvU3Z9C8Zo83So_lyPW8G01spE4tR7lq9UyZy20A195nGdWhcjLr/s1600/warning.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGTJZVWl_247qvrPaAQP3q_m72XjGbwZ1MUvtmu3VZd7rGnFvC0zUwlIXG-rgv8aKVZDXvsfOKKziTw7gRvruiw81knvU3Z9C8Zo83So_lyPW8G01spE4tR7lq9UyZy20A195nGdWhcjLr/s320/warning.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Este es el&amp;nbsp;código:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;MessageBox.Show(&quot;No se puede completar la operacion&quot;, &quot;Peligro&quot;, &lt;b&gt;MessageBoxButtons&lt;/b&gt;.OK, &lt;b&gt;MessageBoxIcon&lt;/b&gt;.Warning);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
Lo primero es que&amp;nbsp;aquí&amp;nbsp;estamos utilizando 4 propiedades del MessageBox, la primera es el mensaje &quot;No se puede completar la&amp;nbsp;operación&quot; el cual puede ser cualquier mensaje que deseemos mostrar, la segunda es el tiltulo del mensaje &quot;Peligro&quot; que al igual que el mensaje podemos poner cualquier texto, la tercera es el tipo de messageBox, en esta caso usamos MessageBoxButtons.OK pero tenemos diferentes opciones ya sea &amp;nbsp; &amp;nbsp;MessageBoxButtons.OKCancel,&amp;nbsp;MessageBoxButtons.YesNo entre otros que nos&amp;nbsp;mostrarían&amp;nbsp;dos botones respectivamente o tres en el caso de utilizar&amp;nbsp;MessageBoxButtons.AbortRetryIgnore o&amp;nbsp;MessageBoxButtons.YesNoCancel en donde se&amp;nbsp;mostraría&amp;nbsp;un&amp;nbsp;botón&amp;nbsp;por cada una de las opciones Yes No Cancel etc. Y por ultimo tenemos&amp;nbsp;&amp;nbsp;la imagen que&amp;nbsp;también&amp;nbsp;nos muestra varias opciones de imagenes, aqui seleccionamos Warning en MessageBoxIcon seguido de MessageBoxButtons como podemos ver en el codigo de ejemplo. Algunas de las imagenes disponibles o Iconos son los siguientes:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQlsPo7S3i6XEQRgcTY6ws2fhNLsVFh3irVnBJecZEkbbNZspyZhQq75SpBsJQFbxdBpE4LxZsXiO0i4r4QUkV0x3G4MeFThT6Vchzuoq9gha8Y6vKoImGw5GMKe2XcpoY12-NVZi8abqD/s1600/warning.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQlsPo7S3i6XEQRgcTY6ws2fhNLsVFh3irVnBJecZEkbbNZspyZhQq75SpBsJQFbxdBpE4LxZsXiO0i4r4QUkV0x3G4MeFThT6Vchzuoq9gha8Y6vKoImGw5GMKe2XcpoY12-NVZi8abqD/s320/warning.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== MessageBoxIcon.Information==&lt;br /&gt;
seria la misma imagen para:&lt;br /&gt;
== MessageBoxIcon.Asterisk ==&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji7Tm26dJ9VAsHEdanb-vsrKD9OF0DCfn_n2a64Peu0b0cZ-LZCrGYYWg1n0qyE2EeKhY-4WqWEVsa7cDKXcPDepPCLNw0azoeRsD8n9vsVCBUjA2CyaSulyR-5HtaItGWvpzgIQ3_G6Kw/s1600/warning.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji7Tm26dJ9VAsHEdanb-vsrKD9OF0DCfn_n2a64Peu0b0cZ-LZCrGYYWg1n0qyE2EeKhY-4WqWEVsa7cDKXcPDepPCLNw0azoeRsD8n9vsVCBUjA2CyaSulyR-5HtaItGWvpzgIQ3_G6Kw/s320/warning.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;==MessageBoxIcon.Error==&lt;br /&gt;
&lt;br /&gt;
Y por ultimo:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhm39BgHOAPsBFfnuX3CilF7y7KYjvjPKK4mjk9UQLGKyKwl-WM2KU0_8f5xPsB5R0Ng-kCA5qmDNcp5XJYJg7qiBvBAamwQPmmjUclV_sfhvhHHdbYNUiQ_il038jzJ0mpp92fdqiMZigj/s1600/warning.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhm39BgHOAPsBFfnuX3CilF7y7KYjvjPKK4mjk9UQLGKyKwl-WM2KU0_8f5xPsB5R0Ng-kCA5qmDNcp5XJYJg7qiBvBAamwQPmmjUclV_sfhvhHHdbYNUiQ_il038jzJ0mpp92fdqiMZigj/s320/warning.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;==MessageBoxIcon.Question==&lt;br /&gt;
&lt;br /&gt;
Espero hayan disfrutado del post, nos vemos pronto con mas controles. Viva C#!!</description><link>http://solocsharp.blogspot.com/2010/05/propiedades-del-messagebox.html</link><author>noreply@blogger.com (Ing.Ismael Medrano)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGTJZVWl_247qvrPaAQP3q_m72XjGbwZ1MUvtmu3VZd7rGnFvC0zUwlIXG-rgv8aKVZDXvsfOKKziTw7gRvruiw81knvU3Z9C8Zo83So_lyPW8G01spE4tR7lq9UyZy20A195nGdWhcjLr/s72-c/warning.JPG" height="72" width="72"/><thr:total>7</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3290494616775942046.post-2628339394074801146</guid><pubDate>Sun, 25 Apr 2010 21:00:00 +0000</pubDate><atom:updated>2010-04-25T17:00:00.716-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Csharp</category><title>Ejecutando aplicaciones externas desde un WinForm</title><description>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px;&quot;&gt;Para este ejemplo utilizaremos el namespace System.Diagnostics que es donde se encuentran las clases que nos permiten comunicarnos con los proceso del sistema. Veamos:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #4f6eed; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px; line-height: 12px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium; line-height: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #4f6eed; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;div style=&quot;border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: none; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;System.Diagnostics.&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Process&lt;/span&gt;&amp;nbsp;programa =&amp;nbsp;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: blue; font-family: inherit; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;new&lt;/span&gt;&amp;nbsp;System.Diagnostics.&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Process&lt;/span&gt;();&lt;/div&gt;&lt;div style=&quot;border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: none; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;programa.StartInfo.FileName =&amp;nbsp;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: maroon; font-family: inherit; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;@&quot;iexplore.exe&quot;&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: none; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;programa.StartInfo.Arguments =&amp;nbsp;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;http://www.google.es&quot;&lt;/span&gt;; // esto es para especificar la url&lt;/div&gt;&lt;div style=&quot;border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: none; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;programa.Start();&lt;/div&gt;&lt;div style=&quot;border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: none; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;programa.WaitForExit(); &amp;nbsp; &amp;nbsp;// esta parte la elimino!&lt;/div&gt;&lt;div style=&quot;border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: none; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;el &amp;nbsp;programa.WaitForExit() lo elimino porque esto no me permite seguir trabajando con mi formulario mientras se ejecute la&amp;nbsp;aplicación&amp;nbsp;externa. Eso es opcional,&amp;nbsp;dependerá&amp;nbsp;de la necesidad del usuario.&lt;/div&gt;&lt;div style=&quot;border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: none; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;Si queremos ejecutar aplicaciones de escritorio como Word por ejemplo, solo basta con lo siguiente:&lt;/div&gt;&lt;div style=&quot;border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: none; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: none; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;System.Diagnostics.&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Process&lt;/span&gt;&amp;nbsp;programa =&amp;nbsp;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: blue; font-family: inherit; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;new&lt;/span&gt;&amp;nbsp;System.Diagnostics.&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Process&lt;/span&gt;();&lt;/div&gt;&lt;div style=&quot;border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: none; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;programa.StartInfo.FileName =&amp;nbsp;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: maroon; font-family: inherit; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;@&quot;winword.exe&quot;&lt;/span&gt;;&lt;/div&gt;&lt;div style=&quot;border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: none; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;programa.Start();&lt;/div&gt;&lt;div style=&quot;border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: none; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;no olviden el using System.Diagnostics;&lt;/div&gt;&lt;div style=&quot;border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; border-width: initial; font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: none; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 1em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;Eso es todo. Chao!!&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #4f6eed; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px; line-height: 12px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;</description><link>http://solocsharp.blogspot.com/2010/04/ejecutando-aplicaciones-externas-desde.html</link><author>noreply@blogger.com (Ing.Ismael Medrano)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3290494616775942046.post-3745277188896541134</guid><pubDate>Mon, 05 Apr 2010 22:26:00 +0000</pubDate><atom:updated>2010-04-05T18:26:00.582-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADO.Net</category><title>Objetos Command,DataSet  y SqlDataAdapter</title><description>En este post le mostraremos estos tres objetos, Command,Dataset y SqlDataAdapter.&amp;nbsp;Comenzamos&amp;nbsp;con el Command, ese es el objeto que utilizamos para ejecutar sentencias en nuestra base de datos desde nuestra&amp;nbsp;aplicación&amp;nbsp;y atraves de una&amp;nbsp;conexión SqlConnection que ya mostramos en un anterior post. El objeto command lo encontramos en nuestro visual&amp;nbsp;Studio&amp;nbsp;de dos formas o representada por dos clase, SqlCommand y OleDbCommand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
El objeto data set se conoce como una copia en memoria de nuestro modelo de datos o nuestra base de datos sobre la cual podemos realizar una sentencia y agregarla a otro objeto ya sea un DataGrid.Datasource , ComboBox .Datasource ,etc. Pero, para cargar un dataset con un Select por ejemplo debemos utilzar el objeto SqlDataAdapter que trabaja aqui como un intermediario entre la base de datos y el dataset. El SqlDataAdapter carga el dataset con la data desde la base de datos.&lt;br /&gt;
&lt;br /&gt;
Veamos un ejemplo utilizando los tres objetos:&lt;br /&gt;
&lt;br /&gt;
Creamos un dataset&lt;br /&gt;
&lt;br /&gt;
Dataset ds = new Dataset();&lt;br /&gt;
&lt;br /&gt;
Creamos un Command en este caso SqlCommand&lt;br /&gt;
&lt;br /&gt;
SqlCommand cmd = new SqlCommand(&lt;b&gt;consulta&lt;/b&gt;,&lt;b&gt;con&lt;/b&gt;); &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;en donde &lt;b&gt;consulta&lt;/b&gt; es la variable que guarda la sentencia que deseamos realizar y &lt;b&gt;con&lt;/b&gt; es el objeto connection que realizamos para poder conectarnos a la base de datos.&lt;br /&gt;
&lt;br /&gt;
Luego creamos el DataAdapter&lt;br /&gt;
&lt;br /&gt;
SqlDataAdapter ad = new SqlDataAdapter(cmd); &amp;nbsp;y le pasamos el Command para mantener el resultado de nuestra sentencia almacenado en el Adapter, y luego:&lt;br /&gt;
&lt;br /&gt;
ad.Fill(ds); &amp;nbsp;Aqui le pasamos entre parentesis al metodo fill del adapter el objeto dataset que queremos llenar.&lt;br /&gt;
&lt;br /&gt;
ya tenemos nuestro dataset cargado. &amp;nbsp;Si lo queremos mostrar en un datagrid hacemos lo siguiente:&lt;br /&gt;
&lt;br /&gt;
mydatagrid.DataSource = ds;&lt;br /&gt;
Espero hayan disfrutado, recuerden que pueden dejar sus comentarios o cualquier pregunta nos pueden escribir a solocsharp@gmail.com y csharpenlinea@gmail.com. Hasta la proxima!.</description><link>http://solocsharp.blogspot.com/2010/04/objetos-commanddataset-y-sqldataadapter.html</link><author>noreply@blogger.com (Ing.Ismael Medrano)</author><thr:total>6</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3290494616775942046.post-7771226625642194821</guid><pubDate>Mon, 05 Apr 2010 06:30:00 +0000</pubDate><atom:updated>2010-04-05T02:30:00.674-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Controles</category><title>ComboBox</title><description>Conocido&amp;nbsp;también&amp;nbsp;como DropDown, en este post le vamos a mostrar 4 de las propiedades de este&amp;nbsp;útil&amp;nbsp;y necesario objeto para el desarrollo de nuestras aplicaciones ya sean en un entorno Web o Win32. Para comenzar veremos la propiedad llamada DropDownStyle: En esta propiedad podemos proteger a nuestro combo de que no le permita al usuario escribir sobre este cuando nuestra&amp;nbsp;aplicación&amp;nbsp;&amp;nbsp;se este ejecutando es decir, si tenemos un combo que usamos de&amp;nbsp;menú&amp;nbsp;y los valores provienen de una Base de datos, lo correcto seria que solo se actualice nuestro combo desde la misma base de datos y no se permita agregarle datos desde nuestra&amp;nbsp;aplicación&amp;nbsp;(manualmente). Pues seleccionamos en DropDownStyle la&amp;nbsp;opción&amp;nbsp;&#39;DropDownList&#39; y ya esta.&lt;br /&gt;
&lt;br /&gt;
Otra propiedad es Items que es la utilizada para agregarle valores al Combo en caso que no lo necesitemos actualizar desde una base de datos. Hacemos clic en la propiedad y en el cuadro que&amp;nbsp;aparecerá&amp;nbsp;escribimos los&amp;nbsp;artículos, nombres, etc, todo lo que necesitemos mostrar en nuestro combo.&lt;br /&gt;
&lt;br /&gt;
Las otras dos propiedades son el DisplayMember y el ValueMember. Antes de explicarle estas propiedades, debemos asumir que estamos cargando nuestro combo con una base de datos y que cada nombre de cada registro que se va &amp;nbsp;a mostrar tiene ID&amp;nbsp;único. El combo lo cargamos con un Query a la base de datos ej: &amp;nbsp;Select ID_Producto, Nombre_Producto from Productos. Aqui estamos solicitando a la base de datos que nos muestre los ID_Productos y Nombre_Productos de la tabla Productos.&amp;nbsp;Entonces, el display member es el valor que mostraremos o mejor dicho, cada valor que mostraremos en el combo y &amp;nbsp;el value member es el ID perteneciente a cada Nombre mostrado. Veamos un ejemplo:&lt;br /&gt;
&lt;br /&gt;
si tenemos dos registros en la una base de datos llamada Productos y tenemos los siguientes valores:&lt;br /&gt;
para el producto 1:&lt;br /&gt;
&lt;br /&gt;
ID_Producto = 1 | Nombre_Producto = Manzana|&lt;br /&gt;
&lt;br /&gt;
para el producto 2:&lt;br /&gt;
&lt;br /&gt;
ID_Producto = 2 | Nombre_Producto = Pera&lt;br /&gt;
&lt;br /&gt;
entonces, para nuestro combo tenemos lo siguiente:&lt;br /&gt;
&lt;br /&gt;
mycombobox.DisplayMember = &quot;Nombre_Producto&quot;;&lt;br /&gt;
mycombobox.ValueMember = &quot;ID_Producto&quot;;&lt;br /&gt;
&lt;br /&gt;
Esto lo que hace es que nos permite mostrar un valor pero que en realidad lo que se esta manejando es el ID del producto, lo que significa que si tenemos miles de productos y no nos lo sabemos por&amp;nbsp;código, seleccionamos el nombre pero en la base de datos se almacenara el ID cuando&amp;nbsp;guardemos&amp;nbsp;la&amp;nbsp;selección&amp;nbsp;y no se almacenara el nombre del producto.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Al principio yo no le encontraba sentido a esta propiedad pero con las necesidades que me iban apareciendo&lt;br /&gt;
necesite utilizarlo y&amp;nbsp;así&amp;nbsp;espero que ustedes&amp;nbsp;también&amp;nbsp;le vean la funcionalidad a estas dos ultimas propiedades.&lt;br /&gt;
Espero hayan disfrutado, hasta la&amp;nbsp;próxima!.</description><link>http://solocsharp.blogspot.com/2010/04/combobox.html</link><author>noreply@blogger.com (Ing.Ismael Medrano)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3290494616775942046.post-2754623541180965041</guid><pubDate>Tue, 30 Mar 2010 00:50:00 +0000</pubDate><atom:updated>2010-03-29T23:26:32.874-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADO.Net</category><title>SqlConnection y Cadena de Conexión (Connection String)</title><description>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;V&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;amos a ver en esta parte 5 objetos que nos permiten realizar&amp;nbsp;conexión&amp;nbsp;a nuestra base de datos y ejecutar sentencias sobre esta, etc. Algunos de estos objetos son propios de ADO.Net ya que algunos se utilizaban anteriormente en ADO como son el Connection y el Command. Para conectarnos a nuestra base de datos en este caso SQL Server creamos un objeto SqlConnection, recordando que debemos de escribir:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;Using System.Data.SqlClient para poder utilizar el objeto SqlConnection. &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #4f6eed; font-weight: 200; line-height: 11px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;SqlConnection SqlConn =&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #4f6eed; font-weight: 200; line-height: 11px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
new SqlConnection(&quot;&amp;nbsp;&amp;nbsp;integrated Security=SSPI;Persist Security Info=False;Initial Catalog=ELVIN;Data&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #4f6eed; font-weight: 200; line-height: 11px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #4f6eed; font-weight: 200; line-height: 11px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Source=DESKTOP\\SQLEXPRESS&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #4f6eed; font-weight: 200; line-height: 11px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
SqlConn.Open();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #4f6eed;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 11px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #4f6eed;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 11px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #4f6eed;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 11px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; line-height: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Aquí&amp;nbsp;lo que hicimos fue crear un objeto SqlConnection y le pasamos nuestra cadena de&amp;nbsp;conexión&amp;nbsp;o Connection String y por ultimo escribimos el nombre de nuestro objeto seguido de un punto y buscamos su metodo Open para abrir nuestra&amp;nbsp;conexión, ya esta!.Asi mismo para cerrar nuestra conexion &amp;nbsp;solo en vez de seleccionar Open, seleccionamos Close.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Una ayudita con el string de conexion, podemos crearlo de la siguiente manera, al menos asi lo hago no soy muy amante a realizar estas cosas &amp;nbsp;a traves del Wizard de VStudio,Veamos:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Abrimos NotePad, luego sin escribir nada selecionamos Guardar y le ponemos un nombre, yo le pongo Cadena, pero no importa le pueden poner como le guste, entonces antes de guardarlo cambiamos la extension a .udl y lo guardamos.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;El icono de nuestro archivo se vera&amp;nbsp;así:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcDOTVfFtlUJ3gIMXgkgfna0Zo_QVEI0Tt3gXKIvvdmUqZcPqXw-_YvnXxdLIDihrzGYJ489snvAqr7DR-ydejCQ4uJ3CdzjjJdHb0fWFAHCGZuc5mAtAve-uTfsnYOKYKlqcoP5I-PrHl/s1600/Dibujo.bmp&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcDOTVfFtlUJ3gIMXgkgfna0Zo_QVEI0Tt3gXKIvvdmUqZcPqXw-_YvnXxdLIDihrzGYJ489snvAqr7DR-ydejCQ4uJ3CdzjjJdHb0fWFAHCGZuc5mAtAve-uTfsnYOKYKlqcoP5I-PrHl/s320/Dibujo.bmp&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Luego le damos doble clic, o clic derecho y seleccionamos asi:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicNspugwi3z6phwb5zO7KuzwI60pHEVNXAohg3MPEVSgDrwgisojVBGWnNtru19fGi-lBaT42XhW41Zo_wCFjTz6DnZn9hMYPd7Y7T_L3k9lbgkIgId7eYkEiCwnK4awrRPHIS4jBMfTE2/s1600/ssss.bmp&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicNspugwi3z6phwb5zO7KuzwI60pHEVNXAohg3MPEVSgDrwgisojVBGWnNtru19fGi-lBaT42XhW41Zo_wCFjTz6DnZn9hMYPd7Y7T_L3k9lbgkIgId7eYkEiCwnK4awrRPHIS4jBMfTE2/s320/ssss.bmp&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicNspugwi3z6phwb5zO7KuzwI60pHEVNXAohg3MPEVSgDrwgisojVBGWnNtru19fGi-lBaT42XhW41Zo_wCFjTz6DnZn9hMYPd7Y7T_L3k9lbgkIgId7eYkEiCwnK4awrRPHIS4jBMfTE2/s1600/ssss.bmp&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;y luego en la pestaña Proveedor seleccionamos la siguiente&amp;nbsp;opción:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg481GuGY0GxPMpOEbPyuxXpYZy0_QyL-x4Ulmwq8Z7pOgmcz4syCqPI0eSTVyWYhUJTDnu8yVfhWVudnSRn_12BsfFl9ZhwzIKVfcepYCLAJ_uvOJCtb5GVyV03HwO6Y8TWFcrCqWQtRhD/s1600/as.bmp&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg481GuGY0GxPMpOEbPyuxXpYZy0_QyL-x4Ulmwq8Z7pOgmcz4syCqPI0eSTVyWYhUJTDnu8yVfhWVudnSRn_12BsfFl9ZhwzIKVfcepYCLAJ_uvOJCtb5GVyV03HwO6Y8TWFcrCqWQtRhD/s320/as.bmp&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Hacemos clic en siguiente, y&amp;nbsp;aparecerá&amp;nbsp;la siguiente pestaña:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS1hVeXrXM4c97nuzGwcf7e9piYsk49nyXeWT0NfZaF6gd5cNU2BUM-wzRtIsd35pSvtUYErywl2DxM9yq_b714h-HWLDuxXzFiVLXtabLPyaAePhMgEwVn2jAvKUDez8NbYDAcHMEHjPA/s1600/as2.bmp&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS1hVeXrXM4c97nuzGwcf7e9piYsk49nyXeWT0NfZaF6gd5cNU2BUM-wzRtIsd35pSvtUYErywl2DxM9yq_b714h-HWLDuxXzFiVLXtabLPyaAePhMgEwVn2jAvKUDez8NbYDAcHMEHjPA/s320/as2.bmp&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Primero seleccionamos el nombre de nuestro servidor, si la usaran con usuario y password hacen clic donde dice: Usar un nombre de usuario y contraseña&amp;nbsp;específicos&amp;nbsp;y lo escriben. Luego el punto tres, seleccionar la base de datos de la cual desean &amp;nbsp;crear el String de&amp;nbsp;conexión&amp;nbsp;y hacer clic en probar&amp;nbsp;conexión. Una vez todo este bien la&amp;nbsp;prueba&amp;nbsp;mostrara un mensaje diciendo que la&amp;nbsp;conexión&amp;nbsp;esta bien. Ya esta, &amp;nbsp;le damos a aceptar y vamos a abrir el archivo que creamos haciendo clic derecho sobre el y seleccionamos abrir con NotePad.&lt;/div&gt;&lt;div&gt;Ahí&amp;nbsp;nos mostrara el String de&amp;nbsp;conexión&amp;nbsp;dentro de nuestro archivo, lo copiamos desde donde dice integrated Security y lo pegamos donde lo queramos usar. Espero hayan disfrutado del post, mas adelante&amp;nbsp;seguiré&amp;nbsp;con los&amp;nbsp;demás&amp;nbsp;objetos&amp;nbsp;mencionados&amp;nbsp;anteriormente, SqlCommand, Data Set,&amp;nbsp;SqlDataReader y SqlDataAdapter. Nos vemos!&lt;/div&gt;</description><link>http://solocsharp.blogspot.com/2010/03/sqlconnection-y-cadena-de-conexion.html</link><author>noreply@blogger.com (Ing.Ismael Medrano)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcDOTVfFtlUJ3gIMXgkgfna0Zo_QVEI0Tt3gXKIvvdmUqZcPqXw-_YvnXxdLIDihrzGYJ489snvAqr7DR-ydejCQ4uJ3CdzjjJdHb0fWFAHCGZuc5mAtAve-uTfsnYOKYKlqcoP5I-PrHl/s72-c/Dibujo.bmp" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3290494616775942046.post-3732048384105910317</guid><pubDate>Sun, 28 Mar 2010 10:50:00 +0000</pubDate><atom:updated>2010-03-28T06:50:00.546-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Herencia</category><title>Heredando Clases</title><description>La herencia es un punto muy importante en la&amp;nbsp;programación&amp;nbsp;orientada a objetos, esta nos permite definir una clase A a partir de una ya existente permitiendole acceder a todos sus atributos, propiedades y&amp;nbsp;métodos&amp;nbsp;siempre y cuando estos no sean&amp;nbsp;Private (privados).&amp;nbsp;Aquí&amp;nbsp;es donde empezamos a hablar de clase padre y clase hija en donde clase padre es la clase que se va a heredar y clase hija es la que hereda. veamos un breve ejemplo de como podemos heredar una clase:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;Cdigofuente&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Class&lt;/span&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;nombreHija&amp;nbsp;&lt;b&gt;:&amp;nbsp;&lt;/b&gt;nombrePadre&lt;/div&gt;&lt;div class=&quot;Cdigofuente&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigofuente&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;miembroshija&gt;&lt;/miembroshija&gt;&lt;/div&gt;&lt;div class=&quot;Cdigofuente&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Como podemos ver en el ejemplo, escribimos el nombre de nuestra clase hija seguida de dos puntos &quot; : &quot; que es el signo que le indica a nuestra clase que esta heredando otra clase y luego el nombre de la clase que queremos heredar. veamos otro ejemplo:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;class Animal &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//clase padre&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px;&quot;&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; private string Sexo;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; private string Alimento;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px;&quot;&gt;&lt;span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px;&quot;&gt;&lt;span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px;&quot;&gt;&lt;span&gt;&amp;nbsp;public void Comer(string alimento)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px;&quot;&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px;&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;{&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;this.Alimento = alimento;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px;&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px;&quot;&gt;&lt;span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px;&quot;&gt;class Perro : Animal &amp;nbsp; &amp;nbsp; &amp;nbsp; // clase hija&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
En la clase perro estamos heredando el&amp;nbsp;método&amp;nbsp;comer que definimos en la clase animal y podemos utilizarlo.&lt;br /&gt;
Otra cosa, cuando estamos&amp;nbsp;heredando&amp;nbsp;muchas personas me dicen que hay que sobre escribir las propiedades de mi clase padre en mi clase hija para poder utilizarlas cosa que por un lado es cierto pero, si defines tu propiedad en la clase padre ya no tienes que definirla cuando la heredes. La sobre escritura de las propiedades la realizamos cuando en nuestra clase padre no esta definida, esto se refiere a cuando no definimos su comportamiento o la implemetacion. Esto es explicado desde mi punto de vista ya que he visto esto de la sobre escritura de propiedades y&amp;nbsp;métodos&amp;nbsp;en varios blogs pero cada programador tiene su forma de ver las cosas y de programar. Nos vemos pronto.</description><link>http://solocsharp.blogspot.com/2010/03/heredando-clases.html</link><author>noreply@blogger.com (Ing.Ismael Medrano)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3290494616775942046.post-6292871001111664763</guid><pubDate>Sat, 13 Mar 2010 11:48:00 +0000</pubDate><atom:updated>2010-03-13T07:48:00.329-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Csharp</category><title>llamar un formulario desde otro formulario</title><description>Como todos sabemos existe una clase Form la cual contiene todos los&amp;nbsp;métodos&amp;nbsp; que definen el comportamiento de nuestros formularios y uno de estos&amp;nbsp;métodos&amp;nbsp;es el de mostrar el form &amp;nbsp;en ingles Show(). Ahora veremos como llamamos a un formulario desde otro formulario&amp;nbsp;utilizando&amp;nbsp;esta simple sentencia:&lt;br /&gt;
&lt;br /&gt;
Supongamos que tenemos dos form, form1 y form2. &amp;nbsp;desde form1 vamos a llamar form2 de la siguiente forma:&lt;br /&gt;
&lt;br /&gt;
//Esto lo pueden utilizar en cualquier evento de cualquier objeto, ya eso&amp;nbsp;dependerá&amp;nbsp;de su necesidad.&lt;br /&gt;
&lt;br /&gt;
aquí&amp;nbsp;lo pongo dentro de un&amp;nbsp;botón, en el evento click del&amp;nbsp;botón. Este&amp;nbsp;botón&amp;nbsp;llamado button1 esta en mi form1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;private void button1_Click(object sender, EventArgs e)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;form2 fp = new form2(); &amp;nbsp;// creamos el objeto del form2&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fp.show(); &amp;nbsp; //&amp;nbsp;aquí&amp;nbsp;lo mostramos en pantalla&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
Así&amp;nbsp;de sencillo se llama un formulario desde otro formulario en C#.</description><link>http://solocsharp.blogspot.com/2010/03/llamar-un-formulario-desde-otro.html</link><author>noreply@blogger.com (Ing.Ismael Medrano)</author><thr:total>4</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3290494616775942046.post-8534431398346816878</guid><pubDate>Sat, 13 Mar 2010 04:50:00 +0000</pubDate><atom:updated>2010-03-13T00:50:00.753-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Microsoft Visual Studio</category><title>Build Solution (F6) y Start debugging (F5)</title><description>&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;ES-DO&quot; style=&quot;mso-ansi-language: ES-DO;&quot;&gt;Cuando seleccionamos Build solution en la opción Build del menú principal o presionamos F6, el IDE compila nuestro programa. El IDE lo hace corriendo el compilador que es quien lee el código de &lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;nuestro programa y lo convierte en un ejecutable.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;El ejecutable es un archivo con extensión .exe&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;que hacemos doble clic para correr nuestro programa.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;Cuando construimos el programa se crea el ejecutable dentro del folder Bin el cual está ubicado dentro del folder de nuestro proyecto.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;ES-DO&quot; style=&quot;mso-ansi-language: ES-DO;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;Cuando seleccionamos Start Debugging en la opción Debug del menú principal, el IDE compila nuestro programa y corre el ejecutable. Esto tiene la ventaja de que podemos pausar la ejecución y analizar el comportamiento del mismo.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;</description><link>http://solocsharp.blogspot.com/2010/03/build-solution-f6-y-start-debugging-f5.html</link><author>noreply@blogger.com (Ing.Ismael Medrano)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3290494616775942046.post-5277586453486164174</guid><pubDate>Mon, 08 Mar 2010 12:54:00 +0000</pubDate><atom:updated>2010-03-08T08:54:00.623-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Instrucciones</category><title>Instrucciones iterativas</title><description>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Las&amp;nbsp;instrucciones iterativas&amp;nbsp;son instrucciones que permiten ejecutar repetidas veces una instrucción o un bloque de instrucciones mientras se cumpla una condición. Ahora le mostraremos las instrucciones de este tipo que forman parte de C#:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Instrucción While&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;esta nos permite ejecutar un bloque de instrucciones tantas veces mientras se cumpla una cierta&amp;nbsp;&amp;nbsp;condición, veamos:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;contador&amp;nbsp;= 0;&lt;/span&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;while&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;(contador &amp;lt; 10)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;contadort++;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;message.show(&quot;El contador es igual a: &quot;+contador);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &lt;br /&gt;
* recuerden mantener la&amp;nbsp;instrucción o las instrucciones&amp;nbsp;entre llaves*&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-size: 12px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h4&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Aquí&amp;nbsp;estamos mostrando una variable llamada contador tipo&amp;nbsp;Int(entero) y la inicializamos con valor igual a cero. Luego tenemos el While con la&amp;nbsp;condición&amp;nbsp;entre&amp;nbsp;paréntesis&amp;nbsp;que dice, mientras contador sea menor a 10, sumaremos 1 a contador. Esta sentencia de sumar 1 a contador se ejecutara mientras contador sea menos a 10. Luego que contador sea igual a 10, mostrara un mensaje que dice &quot;El contador es igual a : +contador&quot; donde contador sera el valor que tenga en si, o sea que debe ser 10.&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Instrucción&amp;nbsp;Do.. while&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Lo&amp;nbsp;único&amp;nbsp;que esta tiene en diferencia a la&amp;nbsp;instrucción&amp;nbsp;While es que en While se&amp;nbsp;evalúa&amp;nbsp;la&amp;nbsp;condición&amp;nbsp;primero y luego se ejecuta la&amp;nbsp;instrucción,&amp;nbsp;aquí&amp;nbsp;se ejecuta la&amp;nbsp;instrucción&amp;nbsp;primero y luego se&amp;nbsp;evalúa&amp;nbsp;la&amp;nbsp;condición. Veamos un ejemplo:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small; font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;public&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;contador&amp;nbsp;= 0;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small; font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; Do&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small; font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;contadort++;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small; font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small; font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;while&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;(contador &amp;lt; 10)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;message.show(&quot;El contador es igual a: &quot;+contador);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small; font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Como podemos ver&amp;nbsp;aquí&amp;nbsp;primero le sumamos 1 a contador y luego se&amp;nbsp;evalúa&amp;nbsp;la&amp;nbsp;condición. Cuando la&amp;nbsp;condición&amp;nbsp;se cumpla se mostrara el mensaje que pusimos.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Instrucción&amp;nbsp;for&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;La&amp;nbsp;instrucción&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;for&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;es una variante de&amp;nbsp;While&amp;nbsp;que permite reducir el código necesario para escribir los tipos de bucles más comúnmente usados en programación. Lo usamos de la siguiente manera:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-size: 12px;&quot;&gt;&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;for &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-size: 11px; white-space: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;inicialización&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-size: 11px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-size: 11px; white-space: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;condición&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-size: 11px; white-space: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;modificación&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: x-large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000; font-size: 11px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: x-large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;color: #990000; font-size: 11px;&quot;&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;El significado de esta instrucción es el siguiente: se ejecutan las instrucciones de&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;inicialización&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;inicialización&gt;&lt;/inicialización&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;, que suelen usarse para definir e inicializar variables que luego se usarán en&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;instrucciones&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;instrucciones&gt;&lt;/instrucciones&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;. Luego se evalúa&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;condición&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;condición&gt;&lt;/condición&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;, y si es falsa se continúa ejecutando por la instrucción siguiente al&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;for;&amp;nbsp;&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;mientras que si es cierta se ejecutan las&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;instrucciones&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;instrucciones&gt;&lt;/instrucciones&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;indicadas, luego se ejecutan las instrucciones de&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;modificación&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;que como su nombre indica suelen usarse para modificar los valores de variables que se usen en&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;instrucciones&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;y luego se reevalúa&amp;nbsp;&lt;/span&gt;&lt;tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;condición&gt;&lt;/condición&gt;&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;repitiéndose el proceso hasta que ésta última deje de ser cierta. veamos un ejemplo:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(int contador = 0; contador &amp;lt; 10; contador ++)&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MessageBox.Show(&quot;contador es igual a:&quot;+contador);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Esto nos dice que para contador igual a cero, mientras sea menor a 10 le sumara 1 y&amp;nbsp;también&amp;nbsp;ira mostrando el valor de contador cada vez que se le sume 1.&lt;/div&gt;&lt;div&gt;Espero que hayan disfrutado del post.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;</description><link>http://solocsharp.blogspot.com/2010/03/instrucciones-iterativas.html</link><author>noreply@blogger.com (Ing.Ismael Medrano)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3290494616775942046.post-4439327605825211448</guid><pubDate>Mon, 08 Mar 2010 11:08:00 +0000</pubDate><atom:updated>2010-03-08T07:08:00.264-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Instrucciones</category><title>Instrucciones condicionales</title><description>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Las&amp;nbsp;instrucciones condicionales&amp;nbsp;son instrucciones que permiten ejecutar bloques de instrucciones sólo si se da una determinada condición. veremos ahora las instrucciones condicionales utilizadas en nuestro querido C#:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h4&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Instrucción if&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;La&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;instrucción&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;permite ejecutar ciertas instrucciones sólo si de da una determinada condición. De esta manera la utilizamos:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;if (&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;condición&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;instruccionesIf ;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;  // &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;se realizan estas instrucciones si la condición se cumple!&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
else&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;instruccionesElse ;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; // &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;se realizan estas instrucciones si la condición no se cumple!&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;ejemplo:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;int contador = 0;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;if(contador &amp;lt; 10)     // Aquí el programa se pregunta si contador es menor a 10          &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;       {
             contador = contador + 1;      suma 1 a contador
        }&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;else               // de lo contrario&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;       {&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;         &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;    messagebox.show(&quot;Contador es igual a :&quot;+contador);  // mostrar el mensaje&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;       }&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;I&lt;b&gt;nstrucción Switch&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;

&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;La&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;instrucción&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;switch&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;permite ejecutar unos u otros bloques de instrucciones según el valor de una cierta expresión. Su estructura es:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;switch (&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;expresión)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;case&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;valor1&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;bloque1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;siguienteAcción&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;case&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;valor2&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;bloque2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;siguienteAcción&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;default:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;bloqueDefault&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;siguienteAcción&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;El significado de esta instrucción es el siguiente: se evalúa&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;expresión&gt;&lt;/expresión&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;. Si su valor es&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;valor1&gt;&lt;/valor1&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;se ejecuta el&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;bloque1&gt;&lt;/bloque1&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;, si es&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;valor2&gt;&lt;/valor2&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;se ejecuta&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;bloque2&gt;&lt;/bloque2&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;, y así para el resto de valores especificados. Si no es igual a ninguno de esos valores y se incluye la rama&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;default&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;, se ejecuta el&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;bloquedefault&gt;&lt;/bloquedefault&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;; pero si no se incluye se pasa directamente a ejecutar la instrucción siguiente al&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;switch&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;. veamos el siguiente ejemplo:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;public string numero;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;switch(num)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;case 1:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;numero=&quot;uno&quot;;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;case 2:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;numero=&quot;dos&quot;;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;case 3:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;numero=&quot;tres&quot;;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;default:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;numero=&quot;error&quot;;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Cdigo&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Espero que le haya sido útil.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;</description><link>http://solocsharp.blogspot.com/2010/03/instrucciones-condicionales.html</link><author>noreply@blogger.com (Ing.Ismael Medrano)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3290494616775942046.post-2656466113210961821</guid><pubDate>Fri, 05 Mar 2010 15:35:00 +0000</pubDate><atom:updated>2010-03-05T11:35:00.965-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Aspectos Básicos</category><title>Declarando variables</title><description>En este post nos vamos a enfocar en las declaraciones de variables y para eso necesitamos tres cosas, los modificadores de acceso, los tipos de datos y la variable a declarar. En C# la&amp;nbsp;declaración&amp;nbsp;de variables es de la siguiente manera:&lt;br /&gt;
&lt;br /&gt;
&lt;modificador acceso=&quot;&quot; de=&quot;&quot;&gt; &lt;tipo datos=&quot;&quot; de=&quot;&quot;&gt; &lt;variable&gt;;&lt;/variable&gt;&lt;/tipo&gt;&lt;/modificador&gt;&lt;br /&gt;
Ejemplo:&lt;br /&gt;
&lt;br /&gt;
Public String Nombre; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; declaramos una variable &amp;nbsp;publica llamada Nombre tipo String.&lt;br /&gt;
&lt;br /&gt;
Private Int Numero; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; declaramos una variable privada llamada Numero tipo Int.&lt;br /&gt;
&lt;br /&gt;
(Recuerden que Int es los mismo que Int32).&lt;br /&gt;
&lt;br /&gt;
De esta otra manera podemos declarar variables:&lt;br /&gt;
&lt;br /&gt;
Public String , Nombre, Apellido,&amp;nbsp;Dirección; &amp;nbsp; &amp;nbsp; Solo si &amp;nbsp;estamos declarando varias variables de un mismo tipo .&lt;br /&gt;
No es posible hacerlo de la siguiente manera:&lt;br /&gt;
&lt;br /&gt;
Public Int Numero, Nombre , Apellido; &amp;nbsp;porque se supone que Nombre y Apellido son Campos de textos no no&amp;nbsp;numéricos&amp;nbsp; y estamos&amp;nbsp;declarándolas&amp;nbsp;Int. Cualquier duda o pregunta recuerden que los posts estan abiertos a comentarios, no olviden comentar o escribirnos al correo solocsharp@gmail.com.</description><link>http://solocsharp.blogspot.com/2010/03/declarando-variables.html</link><author>noreply@blogger.com (Ing.Ismael Medrano)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3290494616775942046.post-4881914952137965318</guid><pubDate>Fri, 05 Mar 2010 14:42:00 +0000</pubDate><atom:updated>2010-03-05T10:42:00.444-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Aspectos Básicos</category><title>Modificadores de acceso</title><description>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Los modificadores de acceso son los que nos especifican quien o desde donde puede ser usado un tipo o un miembro (clase,&amp;nbsp;método, etc). En el siguiente cuadro tenemos dos columnas, una nos muestra el Modificador y la segunda nos dice desde donde puede ser usada:&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, arial, sans-serif;&quot;&gt;&lt;table style=&quot;font-size: 10pt; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;&lt;tbody&gt;
&lt;tr class=&quot;header&quot; style=&quot;background-color: #bcbcde; font-size: 10pt; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;&lt;th style=&quot;font-size: 10pt; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;Modificador de acceso&lt;/th&gt;&lt;th style=&quot;font-size: 10pt; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;Un&amp;nbsp;método&amp;nbsp;X &amp;nbsp;definido en una clase Y es accesible...&lt;/th&gt;&lt;/tr&gt;
&lt;tr class=&quot;data&quot; style=&quot;background-color: #d9d9d9; font-size: 10pt; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;&lt;td style=&quot;font-size: 10pt; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;&lt;code style=&quot;display: inline; font-size: 11pt; text-align: left; white-space: pre;&quot;&gt;public&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;font-size: 10pt; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;desde cualquier sitio&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;data&quot; style=&quot;background-color: #d9d9d9; font-size: 10pt; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;&lt;td style=&quot;font-size: 10pt; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;&lt;code style=&quot;display: inline; font-size: 11pt; text-align: left; white-space: pre;&quot;&gt;private&lt;/code&gt;&amp;nbsp;(por defecto)&lt;/td&gt;&lt;td style=&quot;font-size: 10pt; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;sólo desde dentro de Y (por defecto)&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;data&quot; style=&quot;background-color: #d9d9d9; font-size: 10pt; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;&lt;td style=&quot;font-size: 10pt; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;&lt;code style=&quot;display: inline; font-size: 11pt; text-align: left; white-space: pre;&quot;&gt;protected&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;font-size: 10pt; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;desde Y y los tipos derivados de Y&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;data&quot; style=&quot;background-color: #d9d9d9; font-size: 10pt; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;&lt;td style=&quot;font-size: 10pt; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;&lt;code style=&quot;display: inline; font-size: 11pt; text-align: left; white-space: pre;&quot;&gt;internal&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;font-size: 10pt; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;desde los tipos incluidos en X&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;data&quot; style=&quot;background-color: #d9d9d9; font-size: 10pt; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;&lt;td style=&quot;font-size: 10pt; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;&lt;code style=&quot;display: inline; font-size: 11pt; text-align: left; white-space: pre;&quot;&gt;protected internal&lt;/code&gt;&lt;/td&gt;&lt;td style=&quot;font-size: 10pt; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;desde Y, los tipos derivados de Y y los tipos incluidos en V&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;El cuadro lo podemos leer de la siguiente manera:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Si nuestro&amp;nbsp;método&amp;nbsp;X es Public pues es accesible desde cualquier sitio de nuestra&amp;nbsp;aplicación. Si es Private solo es accesible desde dentro de la mismo clase a la que pertenece, a la clase Y. Si es Protected, es accesible desde la clase Y y desde las otras clases que&amp;nbsp;heredan&amp;nbsp;o son derivadas de la clase Y. Si es Internal es accesible desde los tipos incluidos en la clase Y. Y si es Protected&amp;nbsp;Internal&amp;nbsp;es una&amp;nbsp;combinación&amp;nbsp;de&amp;nbsp;Internal&amp;nbsp;y&amp;nbsp;Protected&amp;nbsp;lo que significa que es accesible desde la clase Y, clases derivadas de Y y tipos incluidos en la clase Y. &amp;nbsp; Espero le haya sido útil.&lt;/span&gt;&lt;/div&gt;</description><link>http://solocsharp.blogspot.com/2010/03/modificadores-de-acceso.html</link><author>noreply@blogger.com (Ing.Ismael Medrano)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3290494616775942046.post-1952979963250117103</guid><pubDate>Fri, 05 Mar 2010 02:10:00 +0000</pubDate><atom:updated>2010-03-04T22:10:00.273-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Clases</category><title>Agregando una clase a un proyecto</title><description>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;Como podemos recordar tuvimos un post creando una clase, pero ahora le mostraremos como crear una clase una vez entremos a visual Studio y creemos un proyectos,o sea como agregar una clase ya sea existente o nueva. Lo que hacemos es entrar a nuestro proyecto y buscamos el Solution Explorer ubicado en la parte lateral derecha. Vemos donde nos aparece el nombre de nuestro proyecto, en mi caso le puse de nombre &quot;Prueba&quot;. En su proyecto, le hacen clic derecho sobre el nombre del proyecto y&amp;nbsp;aparecerá&amp;nbsp;como en la siguiente&amp;nbsp;gráfica:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQZFOsAjv8Ja0bqe_pV2oTnPKORibl9Fg5MSyxiICwjQkTd__PyOOSnOjwj426fMp590Ed3PBQZzrYV0wzAvykjKh7jEZqzZL9J3DyeWHpbpVNvDs0lMkydjziNPi4hRoGZqnVz7tVnrCc/s1600-h/sss.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQZFOsAjv8Ja0bqe_pV2oTnPKORibl9Fg5MSyxiICwjQkTd__PyOOSnOjwj426fMp590Ed3PBQZzrYV0wzAvykjKh7jEZqzZL9J3DyeWHpbpVNvDs0lMkydjziNPi4hRoGZqnVz7tVnrCc/s320/sss.bmp&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;Seleccionan Add y luego Class.&amp;nbsp;Aparecerá&amp;nbsp;otra ventana así:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0SURObYpJkbdggnMU4oPbr9rbPm9zaibGWR0-5fe5TOp2qHnFvzgPKjMYnGuMr85nMpdqLPJAuOuk4wqbAesUIkFQMl9QzIKJ5V78uVqtdvIKdUqvfMdPUevuqGapX3EWXTdKod0WEBPb/s1600-h/sss2.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0SURObYpJkbdggnMU4oPbr9rbPm9zaibGWR0-5fe5TOp2qHnFvzgPKjMYnGuMr85nMpdqLPJAuOuk4wqbAesUIkFQMl9QzIKJ5V78uVqtdvIKdUqvfMdPUevuqGapX3EWXTdKod0WEBPb/s320/sss2.bmp&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;Entonces le agregan el nombre que le deseen poner a su clase, yo le voy a poner Carro. Le dan a Add y listo, podemos ver que nuestra clase esta agregada a nuestro proyecto en el Solution Explorer:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcWwlb-8DOqbCgItlAFZ6r6-iNKOZE-MqlERVttEsVIvkL97Jcg69heI9s_svzYikNzfVksDFAjcS8mhMv3zePqeNEVAgk8MDxAvWkey_CrtQ4l73hrwN8IL8z8M62l64lVJV_R0hIh173/s1600-h/clase2.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcWwlb-8DOqbCgItlAFZ6r6-iNKOZE-MqlERVttEsVIvkL97Jcg69heI9s_svzYikNzfVksDFAjcS8mhMv3zePqeNEVAgk8MDxAvWkey_CrtQ4l73hrwN8IL8z8M62l64lVJV_R0hIh173/s320/clase2.bmp&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;Y en el bloque de mi clase, donde dice Class carro entre las llaves, escribimos nuestro&amp;nbsp;código. En caso de que la clase que deseamos agregar a nuestro proyecto ya existe, el proceso es muy parecido solo que luego que seleccionamos Add, en vez de seleccionar Class, seleccionamos Existing Item:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCq-PdOcXWwfEBE7ovOk6t7IcJ0HuGYy510R4ZaEcsTWoVZrueVNyinhJ1Kt-BeuVpQPV2cc2ZHa-xETI-z28W1CL3AJEIS-khL4U7PtrL6wmw46nhcLlp7Ngln7SfZ9juxXxVerHc6g_2/s1600-h/ex.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCq-PdOcXWwfEBE7ovOk6t7IcJ0HuGYy510R4ZaEcsTWoVZrueVNyinhJ1Kt-BeuVpQPV2cc2ZHa-xETI-z28W1CL3AJEIS-khL4U7PtrL6wmw46nhcLlp7Ngln7SfZ9juxXxVerHc6g_2/s320/ex.bmp&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;luego nos&amp;nbsp;pedirá&amp;nbsp;la&amp;nbsp;ubicación&amp;nbsp;del archivo, lo ubicamos y ya está.&amp;nbsp;Hasta aquí nuestro post, le estaremos dando seguimiento a este tema en futuros posts. Espero que le haya sido útil.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;</description><link>http://solocsharp.blogspot.com/2010/03/agregando-una-clase-un-proyecto.html</link><author>noreply@blogger.com (Ing.Ismael Medrano)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQZFOsAjv8Ja0bqe_pV2oTnPKORibl9Fg5MSyxiICwjQkTd__PyOOSnOjwj426fMp590Ed3PBQZzrYV0wzAvykjKh7jEZqzZL9J3DyeWHpbpVNvDs0lMkydjziNPi4hRoGZqnVz7tVnrCc/s72-c/sss.bmp" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3290494616775942046.post-6185473581084492520</guid><pubDate>Thu, 04 Mar 2010 13:44:00 +0000</pubDate><atom:updated>2010-03-04T09:44:00.251-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Csharp</category><title>Tipos de datos</title><description>&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Aquí&amp;nbsp;tenemos los tipos de datos utilizados para el desarrollo de aplicaciones en C#. Vemos la primera celda que nos dice &quot;Tipo&quot; que se refiere al tipo de datos que vamos a utilizar ejemplo: Char, String, &amp;nbsp;Decimal etc. Luego tenemos una pequeña&amp;nbsp;descripción, luego la cantidad de Bits que soportan.&amp;nbsp;También&amp;nbsp;tenemos el Rango de valores que nos especifican los limites que cada tipo de dato soporta. Y por último tenemos el alias que es otra forma de llamar a cada tipo, por ejemplo si declaro una variable tipo Int32 podemos&amp;nbsp;también&amp;nbsp;declararla como Int y al final estamos haciendo lo mismo. &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px; color: #666666; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-weight: normal;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Les muestro un cuadro con los tipos de datos:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Helvetica, sans-serif; font-size: 12px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtYR36T30DDAwKUG0l3nGBT5Sk3ZQ6qPGObfYLskMsnKV5sZpVvk_aeewwQhUJnf54KpaYRmgir6dmrDv0PYFloCENKw9MD2fSDqeaO5UA5TvMQhWhjMeoA5tt0XnRyXxNbiZcHEcRWZe9/s1600-h/tipos.bmp&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;475&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtYR36T30DDAwKUG0l3nGBT5Sk3ZQ6qPGObfYLskMsnKV5sZpVvk_aeewwQhUJnf54KpaYRmgir6dmrDv0PYFloCENKw9MD2fSDqeaO5UA5TvMQhWhjMeoA5tt0XnRyXxNbiZcHEcRWZe9/s640/tipos.bmp&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666; font-family: Arial, Helvetica, sans-serif; font-size: 12px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px; font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px; font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px; font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px; font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px; font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px; font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px; font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px; font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px; font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px; font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px; font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px; font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px; font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px; font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px; font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px; font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px; font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px; font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px; font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px; font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px; font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px; font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px; font-size: medium;&quot;&gt;&lt;b&gt;(clic en la imagen para agrandarla) &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px; font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 3px; -webkit-border-vertical-spacing: 3px; font-size: medium;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;</description><link>http://solocsharp.blogspot.com/2010/03/tipos-de-datos.html</link><author>noreply@blogger.com (Ing.Ismael Medrano)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtYR36T30DDAwKUG0l3nGBT5Sk3ZQ6qPGObfYLskMsnKV5sZpVvk_aeewwQhUJnf54KpaYRmgir6dmrDv0PYFloCENKw9MD2fSDqeaO5UA5TvMQhWhjMeoA5tt0XnRyXxNbiZcHEcRWZe9/s72-c/tipos.bmp" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3290494616775942046.post-1777583207672381015</guid><pubDate>Thu, 04 Mar 2010 12:43:00 +0000</pubDate><atom:updated>2010-03-04T08:43:00.316-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Clases</category><title>Herencia</title><description>Este es otro de los conceptos que yo recomiendo estudiar a los que se inician en la&amp;nbsp;programación&amp;nbsp;objeto. Este es una de las principales caracteristicas que nos brinda la&amp;nbsp;programación&amp;nbsp;orientada a objeto. La herencia en pocas palabras como la misma palabra lo dice, &quot;Herencia&quot; de heredar, se refiere a que nosotros luego de crear o definir una clase A podemos crear una clase B a partir de la clase A, la cual herede ó tome la&amp;nbsp;definición&amp;nbsp;y todo el comportamiento ó sea campos y&amp;nbsp;métodos&amp;nbsp;de la clase A llamada&amp;nbsp;también&amp;nbsp;clase Padre ó clase base y la clase B clase Hija. &amp;nbsp;por ejemplo:&lt;br /&gt;
recordemos la clase carro definida en &lt;a href=&quot;http://solocsharp.blogspot.com/2010/02/que-son-clases_27.html&quot;&gt;este&lt;/a&gt; post donde&amp;nbsp;decíamos&amp;nbsp;que estaba formada por los&amp;nbsp;métodos&amp;nbsp;acelerar() y frenar(). Si por ejemplo creamos una clase llamada Motocicleta podemos hacer que esta herede los&amp;nbsp;métodos&amp;nbsp;acelerar y frenar ya que son comportamientos que las dos clases tienen en&amp;nbsp;común. Ahora en C# se hereda de la siguiente manera:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;public Class Motocicleta : Carro &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
Tenemos&amp;nbsp;ahí&amp;nbsp;el nombre de la clase nueva llamada motocicleta seguida de dos puntos que es el operador ó identificador de la herencia y luego de los dos puntos ponemos la clase que deseamos heredar, en este caso la clase Carro.&lt;br /&gt;
&quot;Ojo&quot;, tambien es posible que en nuestra clase hija podamos agregar campos o metodos propios de la clase aparte de los que herede.&amp;nbsp;También&amp;nbsp;aprovecho para comentar que en C# a diferencia que en Java, en este no es soportada la herencia&amp;nbsp;múltiple, pero para eso podemos utilizar lo que son las interfaces. Veremos interfaces en un siguiente post. Espero que hayan disfrutado del post.</description><link>http://solocsharp.blogspot.com/2010/03/herencia.html</link><author>noreply@blogger.com (Ing.Ismael Medrano)</author><thr:total>0</thr:total></item></channel></rss>