<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='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'><id>tag:blogger.com,1999:blog-4975989812845545081</id><updated>2024-09-07T20:57:45.059-07:00</updated><category term=".NET"/><category term="VB.NET"/><category term="Algoritmo"/><category term="Análise Orientada a Objetos"/><category term="Console"/><category term="Programação"/><category term="UML"/><category term="C#"/><category term="Caso de Uso."/><title type='text'>.NET Programmers Extreme</title><subtitle type='html'>Blog sobre programação e tecnologia .NET</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://extremedonet.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4975989812845545081/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://extremedonet.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06494412110259730814</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4975989812845545081.post-6268750916968971398</id><published>2014-03-05T11:30:00.000-08:00</published><updated>2014-03-05T11:36:53.284-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="Análise Orientada a Objetos"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="UML"/><title type='text'>TYPE SAFE CAST (Casting Seguro) </title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.blogger.com/video.g?token=AD6v5dzrEgeapmnvaT7na_EaAxokQ9NUUBJB0czwFhvQ5N9gARAq29kJ1s7UdlbE-rp6OOonwoUjXrj63ns6-niMdw&#39; class=&#39;b-hbp-video b-uploaded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
FONTE : https://www.youtube.com/watch?v=_tEM3U0xA8Y</content><link rel='replies' type='application/atom+xml' href='http://extremedonet.blogspot.com/feeds/6268750916968971398/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://extremedonet.blogspot.com/2014/03/type-safe-cast-casting-seguro.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4975989812845545081/posts/default/6268750916968971398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4975989812845545081/posts/default/6268750916968971398'/><link rel='alternate' type='text/html' href='http://extremedonet.blogspot.com/2014/03/type-safe-cast-casting-seguro.html' title='TYPE SAFE CAST (Casting Seguro) '/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06494412110259730814</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4975989812845545081.post-6663338003173254929</id><published>2014-03-05T10:58:00.003-08:00</published><updated>2014-03-06T05:46:06.234-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Análise Orientada a Objetos"/><category scheme="http://www.blogger.com/atom/ns#" term="Caso de Uso."/><category scheme="http://www.blogger.com/atom/ns#" term="UML"/><title type='text'>Análise Orientada a Objetos - Introdução</title><content type='html'>&lt;span style=&quot;color: white; font-family: Corbel; font-size: 24pt; line-height: 90%; text-align: left; text-indent: -0.24in;&quot;&gt;partes&lt;/span&gt;&lt;span style=&quot;color: white; font-family: Corbel; font-size: 24pt; line-height: 90%; text-align: left; text-indent: -0.24in;&quot;&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS56RYlNfzqWzjgdZV7-EIBQPbVZZ-3DRhP-7ebBSi0VQETJ5YyNZHYxmpbnBS9Kv6XxTDmFh9hvBNDmTTFEbWYH-M9qgxXW7hMiX5GYwGHzmyk7FwwLYuTfPsV-pV3B20zT3mTvY1rgn8/s1600/oo1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS56RYlNfzqWzjgdZV7-EIBQPbVZZ-3DRhP-7ebBSi0VQETJ5YyNZHYxmpbnBS9Kv6XxTDmFh9hvBNDmTTFEbWYH-M9qgxXW7hMiX5GYwGHzmyk7FwwLYuTfPsV-pV3B20zT3mTvY1rgn8/s1600/oo1.png&quot; height=&quot;361&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Programação Orientada a Objetos -&amp;nbsp;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Baseada &amp;nbsp;no mundo real.&amp;nbsp;&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Surgiu para resolver a crise de software dos anos 70.&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Reutilização de código.&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Proporciona fácil manutenção devido ao desacoplamento das partes.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&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/AVvXsEgo3xz2C5JeDxjq8WtKjTlJBz_pXO5uKGpyb23JUBZWzDdGy8Hrqk-z1-CiR3aKjFAvu_Bo-XMh_vikAM93gvTojvsfEH7119uMmKyR67hkp6Qp_369KnOqa73WBlCE12GMB9j83kJNIUfe/s1600/Slide3.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/AVvXsEgo3xz2C5JeDxjq8WtKjTlJBz_pXO5uKGpyb23JUBZWzDdGy8Hrqk-z1-CiR3aKjFAvu_Bo-XMh_vikAM93gvTojvsfEH7119uMmKyR67hkp6Qp_369KnOqa73WBlCE12GMB9j83kJNIUfe/s1600/Slide3.JPG&quot; height=&quot;360&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEi8pe38TEfuoCzDfofPMDW8vcVIjxt3TfckssBzeVdiG7K2Q92BdvCPVlSy-SaCjSamzQcDDRa_jBLz96dSWPm2epPSfvQpKRLSuaLLjmVr_pZWlhNGeLYtPXDhyWOMLtHwubJX2BdTZoqJ/s1600/Slide4.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/AVvXsEi8pe38TEfuoCzDfofPMDW8vcVIjxt3TfckssBzeVdiG7K2Q92BdvCPVlSy-SaCjSamzQcDDRa_jBLz96dSWPm2epPSfvQpKRLSuaLLjmVr_pZWlhNGeLYtPXDhyWOMLtHwubJX2BdTZoqJ/s1600/Slide4.JPG&quot; height=&quot;360&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEi3KgWXT6Ksceem-o5gJoV2UbVQlDcGoxJWlN9mqc1hh-n99sb6yNFvfVkk4vE22KzN1NytvDbUJ8LSUQDwc4y2mHoJlrtKCQrZZFggGu1wbHblwSMjMQU48PM4dTUo4OUTq-aipBhhHoGd/s1600/Slide5.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/AVvXsEi3KgWXT6Ksceem-o5gJoV2UbVQlDcGoxJWlN9mqc1hh-n99sb6yNFvfVkk4vE22KzN1NytvDbUJ8LSUQDwc4y2mHoJlrtKCQrZZFggGu1wbHblwSMjMQU48PM4dTUo4OUTq-aipBhhHoGd/s1600/Slide5.JPG&quot; height=&quot;360&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEj2DB1RbgMmeLm3BgtE7QYTn2T9V5uAg3Z-VMl753dcNvpzx4w7z0cHdxJERgzLCqXY-mgzGMywDe4Kaz-6peODPzxKCRifTu59x5PecJxeZJ8qAuB7c284i44kVaCqqR2rBH-VVyw7wFij/s1600/Slide6.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/AVvXsEj2DB1RbgMmeLm3BgtE7QYTn2T9V5uAg3Z-VMl753dcNvpzx4w7z0cHdxJERgzLCqXY-mgzGMywDe4Kaz-6peODPzxKCRifTu59x5PecJxeZJ8qAuB7c284i44kVaCqqR2rBH-VVyw7wFij/s1600/Slide6.JPG&quot; height=&quot;360&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEjIxIGEQhCRPWdc-EMtZez8j4l0qQCTcSjiMcBIJmExmXeYd26v4rGJm1ONN4CDRZNGlPNvAbZv25zithfONT6G_9NYICwtiG8da6ybn7rKq1c_PrAxa0HtTaedPKv_Bxplw5XNFBa8tY9r/s1600/Slide7.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/AVvXsEjIxIGEQhCRPWdc-EMtZez8j4l0qQCTcSjiMcBIJmExmXeYd26v4rGJm1ONN4CDRZNGlPNvAbZv25zithfONT6G_9NYICwtiG8da6ybn7rKq1c_PrAxa0HtTaedPKv_Bxplw5XNFBa8tY9r/s1600/Slide7.JPG&quot; height=&quot;360&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEjKe8B3afxu6vXtNaV5U1bPK0B6E8vld9zKhyphenhyphendX6LxCAjv20WDAMVzYqIv_iqoj13zoqECjsavDPntZSEdj1JSwvtjlVr6sRyAXLQ3mUP2kiBCe4gL86sxbDfivCBj1qzgqeqE9EP7BKJpV/s1600/Slide8.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/AVvXsEjKe8B3afxu6vXtNaV5U1bPK0B6E8vld9zKhyphenhyphendX6LxCAjv20WDAMVzYqIv_iqoj13zoqECjsavDPntZSEdj1JSwvtjlVr6sRyAXLQ3mUP2kiBCe4gL86sxbDfivCBj1qzgqeqE9EP7BKJpV/s1600/Slide8.JPG&quot; height=&quot;360&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEh_6a7vF_qbh_kXbJGQvczXgc2pWjTueH5cAngCET52FHrqitQe10D_vCP4T0Fg7HrhwlS1C_HjROfMPPMRx3we6HLbgwQwhKjuUOjg3oHQCX19MAh4Cq3nkokSBIMgyhRE14cDuJOXOV9S/s1600/Slide9.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/AVvXsEh_6a7vF_qbh_kXbJGQvczXgc2pWjTueH5cAngCET52FHrqitQe10D_vCP4T0Fg7HrhwlS1C_HjROfMPPMRx3we6HLbgwQwhKjuUOjg3oHQCX19MAh4Cq3nkokSBIMgyhRE14cDuJOXOV9S/s1600/Slide9.JPG&quot; height=&quot;360&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEjzcYOGetpWXazkzsoo9MSfFYTdZjhjbf79StB6IMI69hXCHgZRh2oQkGgpy7Q0nCMjL9NLXpjYQKPvB9pesXK_UU982LEt_DdHY5Z6XjVjdJSFE-l-W1t3Dl78fYChpVVd9xvdi2tLnEsY/s1600/Slide10.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/AVvXsEjzcYOGetpWXazkzsoo9MSfFYTdZjhjbf79StB6IMI69hXCHgZRh2oQkGgpy7Q0nCMjL9NLXpjYQKPvB9pesXK_UU982LEt_DdHY5Z6XjVjdJSFE-l-W1t3Dl78fYChpVVd9xvdi2tLnEsY/s1600/Slide10.JPG&quot; height=&quot;360&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEhMnjuQNF_wRmPfRFGnkHekpvrBufb0B9MzbWk9XCpgiUjgdEKZVTfLFWw24024LzEpVtOzbv0PM7C65o8Ee2AhmWzWTMF2G3xx9k4_DWznCg-BFJO6GEn7pf-eW94Bq24a5jvbL83pZAP_/s1600/Slide11.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/AVvXsEhMnjuQNF_wRmPfRFGnkHekpvrBufb0B9MzbWk9XCpgiUjgdEKZVTfLFWw24024LzEpVtOzbv0PM7C65o8Ee2AhmWzWTMF2G3xx9k4_DWznCg-BFJO6GEn7pf-eW94Bq24a5jvbL83pZAP_/s1600/Slide11.JPG&quot; height=&quot;360&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEhIt9o7VSuBWZ-iy6vwnBbB9yT5fwI9lRukXmjxC3nGKPsJF85iJfLfq2HisMc22eA6Fv2Xi0cu6aly5PHPX1AyL-UYauxaUSsDMkBgBDN9Kk8EhmCtNTv0L-O5sXgPNhbM64jryXPctN2A/s1600/Slide12.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/AVvXsEhIt9o7VSuBWZ-iy6vwnBbB9yT5fwI9lRukXmjxC3nGKPsJF85iJfLfq2HisMc22eA6Fv2Xi0cu6aly5PHPX1AyL-UYauxaUSsDMkBgBDN9Kk8EhmCtNTv0L-O5sXgPNhbM64jryXPctN2A/s1600/Slide12.JPG&quot; height=&quot;360&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEjr6e7B-N8TsZAepoYsLRVh5SvLptpAf0BfOHrdy6X91ziMF2kbPL3gGwlBAkj4qsvOWOzvRiTOUDBki-TwDqPqoBk_Kaex1ytlO6p77Z-uZ8rzwB1REzelGSB3cxOuE6s7on0AfJwLKfnP/s1600/Slide13.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/AVvXsEjr6e7B-N8TsZAepoYsLRVh5SvLptpAf0BfOHrdy6X91ziMF2kbPL3gGwlBAkj4qsvOWOzvRiTOUDBki-TwDqPqoBk_Kaex1ytlO6p77Z-uZ8rzwB1REzelGSB3cxOuE6s7on0AfJwLKfnP/s1600/Slide13.JPG&quot; height=&quot;360&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEgUBd48i-cTevZ4NkXffXqHvocRwm8w0EToH_dnJXxF6Ely6uYJmBDZ_HGTi3Yw31gdmBjjG8abeIGe2lwwyh06BPy72ug_t00gS7XZndbNE_OvkkMx9RjJXSGcAzGTN320vdwDbiJJ-4vb/s1600/Slide14.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/AVvXsEgUBd48i-cTevZ4NkXffXqHvocRwm8w0EToH_dnJXxF6Ely6uYJmBDZ_HGTi3Yw31gdmBjjG8abeIGe2lwwyh06BPy72ug_t00gS7XZndbNE_OvkkMx9RjJXSGcAzGTN320vdwDbiJJ-4vb/s1600/Slide14.JPG&quot; height=&quot;360&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEg-xHRWRn9slYuhdZtoF-d45DfSG121sJPjNFGWqL1XI4zxg30_sYcTQHTwvS0NUmRBMPKiKLW7eyZ1B_3zgJHRTZrN8DU4alEF2CK1QmO4Vxhuecj5qGPJ58c9hpXGCS8O3GHMIHDz3Yo8/s1600/Slide15.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/AVvXsEg-xHRWRn9slYuhdZtoF-d45DfSG121sJPjNFGWqL1XI4zxg30_sYcTQHTwvS0NUmRBMPKiKLW7eyZ1B_3zgJHRTZrN8DU4alEF2CK1QmO4Vxhuecj5qGPJ58c9hpXGCS8O3GHMIHDz3Yo8/s1600/Slide15.JPG&quot; height=&quot;360&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEgzR3Ie4wuHN31m2jXHPuG11elhfhgt0t99IQ2ajJ2V6Y6h2m0cC3SAkbwRhMecDtMcxHVw8loeChFmavGT3ouwba3xCLmBUow-9sa5uboba_FS1VLc4x5lE5kX9USLKaQLDH7TTkajfHmJ/s1600/Slide16.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/AVvXsEgzR3Ie4wuHN31m2jXHPuG11elhfhgt0t99IQ2ajJ2V6Y6h2m0cC3SAkbwRhMecDtMcxHVw8loeChFmavGT3ouwba3xCLmBUow-9sa5uboba_FS1VLc4x5lE5kX9USLKaQLDH7TTkajfHmJ/s1600/Slide16.JPG&quot; height=&quot;360&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://extremedonet.blogspot.com/feeds/6663338003173254929/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://extremedonet.blogspot.com/2014/03/analise-orienta-objetos-introducao.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4975989812845545081/posts/default/6663338003173254929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4975989812845545081/posts/default/6663338003173254929'/><link rel='alternate' type='text/html' href='http://extremedonet.blogspot.com/2014/03/analise-orienta-objetos-introducao.html' title='Análise Orientada a Objetos - Introdução'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06494412110259730814</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS56RYlNfzqWzjgdZV7-EIBQPbVZZ-3DRhP-7ebBSi0VQETJ5YyNZHYxmpbnBS9Kv6XxTDmFh9hvBNDmTTFEbWYH-M9qgxXW7hMiX5GYwGHzmyk7FwwLYuTfPsV-pV3B20zT3mTvY1rgn8/s72-c/oo1.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4975989812845545081.post-2570261013648745167</id><published>2012-08-27T10:44:00.001-07:00</published><updated>2012-08-27T10:44:30.599-07:00</updated><title type='text'>Criando objeto de acesso a dados para banco de dados  MySQL </title><content type='html'>Neste Post estudaremos como criar uma classe responsável para acesso ao banco de dados MySql.&lt;br /&gt;
Esta classe servirá para uma preparação, quando uma aplicação fizer alguma transação com o banco de dados, seja um cadastro, uma exclusão ou uma consulta, a mesma deve saber quais sãos os objetos que ela vai utilizar. Neste caso usaremos os objetos para MySql (estão definidos na dll MySql.Data.dll).&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;b&gt;Fazendo referência.&lt;/b&gt;&lt;/h3&gt;
&lt;div&gt;
O SGBD MySql não foi desenvolvido pela Microsoft e seus objetos não são nativos do .NET Framework, isso significa que teremos de utilizar uma dll de terceiro.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
O instalador do conector MySql .NET pode ser encontrado no link:&lt;br /&gt;
&lt;a href=&quot;http://dev.mysql.com/downloads/connector/net/6.4.html&quot;&gt;http://dev.mysql.com/downloads/connector/net/6.4.html&lt;/a&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Após a instalação poderemos adicionar a referência da dll do MySql ao nosso projeto. (talvez seja necessária a reinicialização do Visual Studio se ele estiver aberto).&lt;/div&gt;
&lt;div&gt;
Para adicionar referência basta dar um clique direito do mouse em cima do projeto no Solution Explorer (Caso o Solution explorer não esteja visível, basta utilizar o atalho Ctrl + Alt + S) e selecionar a opção Adicionar Referência.&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/AVvXsEggKBv86AYjwtysI6CHoZEsiWbJHqJgMqFnyCnRiMdrv9lmvePpsjowxSZvTKpqgc6f0Kehi9UWWKCBPXn_HaibpghlVd30-esPwS2mZiVv9AJBZ4yHqUhVvaLsKEBuTso9rlJm0BqsMIlo/s1600/AddReferencia.png&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/AVvXsEggKBv86AYjwtysI6CHoZEsiWbJHqJgMqFnyCnRiMdrv9lmvePpsjowxSZvTKpqgc6f0Kehi9UWWKCBPXn_HaibpghlVd30-esPwS2mZiVv9AJBZ4yHqUhVvaLsKEBuTso9rlJm0BqsMIlo/s1600/AddReferencia.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Observe o nome da dll &lt;b style=&quot;font-style: italic; text-decoration: underline;&quot;&gt;Mysql.Data &amp;nbsp;&lt;/b&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Para ter acesso aos objetos MySql.Data é necessário importa-los para classe que estamos criando.&amp;nbsp;&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/AVvXsEjpGDNeSkgfq4fUKREYNX8dRMhLQAmWlEXUrG0OQrHKYMsRUC1ptfCCe3_YGPyLJIGpmoLsovDPLy249zUq3yuIENgffoBF89JSuQsnPy4augdUoTpvegFa1C-kgENfp-1ang6IpT3Tnqm9/s1600/imports.png&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/AVvXsEjpGDNeSkgfq4fUKREYNX8dRMhLQAmWlEXUrG0OQrHKYMsRUC1ptfCCe3_YGPyLJIGpmoLsovDPLy249zUq3yuIENgffoBF89JSuQsnPy4augdUoTpvegFa1C-kgENfp-1ang6IpT3Tnqm9/s1600/imports.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
O próximo passo é informarmos os dados do servidor onde está a base de dados que iremos usar.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
No exemplo a seguir estou referenciando uma base de dados MySql local, instalada no meu próprio computador.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&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/AVvXsEh8L9VcaAFpuXSNT0EMKYCvGMB4K1VvDDlQGogP0AAWGSj83omabEQ1bgVTymH_6MCtR2vXi7Nsb5LZVG6As7S-agl0PT3-vBRCSz5oA_eo0dZ8maXxpsHRukMpcF93By_a-3UWGfadwUQw/s1600/StringDeConexao.png&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/AVvXsEh8L9VcaAFpuXSNT0EMKYCvGMB4K1VvDDlQGogP0AAWGSj83omabEQ1bgVTymH_6MCtR2vXi7Nsb5LZVG6As7S-agl0PT3-vBRCSz5oA_eo0dZ8maXxpsHRukMpcF93By_a-3UWGfadwUQw/s1600/StringDeConexao.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;String de Conexão.&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Na primeira linha do código acima temos uma constante que, diferentemente de uma variável, tem seu valor imutável. O uso de uma constante é discutível para este caso. Existe uma possibilidade de trabalharmos futuramente com um servidor remoto ou até mesmo a possibilidade da senha do servidor MySql mudar. Futuramente vamos abordar práticas melhores para tratar strings de conexão.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
A string de conexão é escrita em formato texto, por esse motivo declaramos no código da classe com String. Na linha a seguir veremos que a &amp;nbsp;string de conexão passará a ser um objeto.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
No início da string temos o atributo &lt;b&gt;server&lt;/b&gt;, se estiver usando uma instalação do MySql do seu próprio computador basta colocar a palavra &lt;b&gt;LOCALHOST&lt;/b&gt;. Agora, se estiver usando usando uma conexão remota informe o número &lt;b&gt;IP&lt;/b&gt; &amp;nbsp;ou o nome do servidor. No atributo &lt;b&gt;User Id &lt;/b&gt;foi informado o Usuário Raiz root, este usuário tem acesso a todas as funcionalidades do servidor MySql, é altamente recomendável que você crie outros usuários e gerencie os privilégios por segurança. Nas versões mais atuais do SGBD MySql o usuário root não pode ser usado remotamente.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Uma observação importante: Se você estiver usando a instalação do MySql sem senha, basta eliminar o &lt;u&gt;PWD= suasenha;&lt;/u&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Por fim, temos o atributo database onde você deve referenciar o nome da base de dados que vai utilizar.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;Objeto de conexão.&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Na segunda linha do código acima trata a instância do objeto de conexão. Este objeto é do tipo MySqlConnection (tipo construído dentro da dll MySql.Data).&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Podemos observar que na instância desse objeto existe um parâmetro:&amp;nbsp;&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/AVvXsEgf11Z88ssc102PUqTFZKn6ziBhVcNjz_QaspES6Hsl-CZriYI3rbnhPik064Fep_p-ELGSDPQwWonFT_TpMP9qwEjv2i5P1yJfV5U6A-W-FmVb9LQWex45HQDhh4UqqQz9to8t0dQNm-lP/s1600/StringDeConexao2.png&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/AVvXsEgf11Z88ssc102PUqTFZKn6ziBhVcNjz_QaspES6Hsl-CZriYI3rbnhPik064Fep_p-ELGSDPQwWonFT_TpMP9qwEjv2i5P1yJfV5U6A-W-FmVb9LQWex45HQDhh4UqqQz9to8t0dQNm-lP/s1600/StringDeConexao2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
O valor passado como parâmetro: conexaoString é a constante que criamos acima, com os dados do servidor MySql em formato texto.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
O uso desse &quot;parâmetro&quot; na instância do objeto do tipo MySqlConnection é chamado de construtor.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Para explicar de forma simples um construtor imagine que &amp;nbsp;um objeto é como um bolo, e o construtor serve para criar esse bolo (objeto) já com algumas características definidas, como por exemplo, um bolo em formato de coração. O construtor é uma forma para criar bolos diferentes. &amp;nbsp;Neste caso estamos criando um objeto do tipo MySqlConnection que já vem com a característica dos dados do nosso servidor MySql.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&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/AVvXsEjaf-biRdmRpQ760Y-fyvFvsy9-CgsC-KdMXOsS9VkIVPolmlIRrZttCHFSPVOMN6HBK89jTPd6Obqpppb3RTMoNZf1bY6iEl0ntzuqF4b7MXerEZIS7X7ElA3MaBfnCvNKDJ5da_MH2_CV/s1600/AbrindoConexao.png&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/AVvXsEjaf-biRdmRpQ760Y-fyvFvsy9-CgsC-KdMXOsS9VkIVPolmlIRrZttCHFSPVOMN6HBK89jTPd6Obqpppb3RTMoNZf1bY6iEl0ntzuqF4b7MXerEZIS7X7ElA3MaBfnCvNKDJ5da_MH2_CV/s1600/AbrindoConexao.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Já temos em nossa aplicação o objeto &lt;b&gt;conexao &lt;/b&gt;que de fato se conectará a um servidor MySql, agora precisaremos ter o cuidado de manipular quando essa conexão deverá estar aberta e quando ela deverá estar fechada.&lt;br /&gt;
&lt;br /&gt;
No código acima temos o método &lt;b&gt;AbreConexao&lt;/b&gt;&amp;nbsp;ele fará a abertura da conexão quando alguma transação de dados for solicitada. O Código foi estruturado assim:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Verificação se a conexão está fechada.&lt;/li&gt;
&lt;/ol&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;u&gt;If conexao.State = ConnectionState.Closed Then &amp;nbsp;&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Estamos usando o &quot;SE&quot; para saber se o estado da conexão é fechado. &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Se ela estiver fechada a condição pedirá que ela seja aberta dentro de um tratamento de erros.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;ol&gt;
&lt;li&gt;Tratamento de erros&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A instrução TRY significa que a aplicação TENTARÁ executar algo, caso ocorra um insucesso o código alocado dentro do bloco CATCH será executado informando uma mensagem de erro.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
O uso do tratamento de erros é uma boa prática. Em algumas linguagens de programação o uso &amp;nbsp;é obrigatório dependendo da situação, no nosso caso estaremos manipulando dados em um servidor SGBD, em JAVA, por exemplo, é obrigatório o uso do TRY/CATCH todas as vezes que transações de dados forem utilizadas. No VB.NET o uso é opcional porém é uma boa prática usa-lo para evitar que aplicação se comporte de forma inesperada. &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Algumas exceções podem ocorrer numa tentativa de abertura de conexão, o tempo de &quot;timeout&quot; pode exceder, os dados do usuário podem estar incorretos. O Catch disparará uma mensagem com o erro ocorrido.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Agora basta criar um método para fechar a conexão assim que terminarmos de utiliza-la.&amp;nbsp;&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/AVvXsEg-jc84Dp-7l7ga_zr-oDzqOZ_DAqFFvFfALA0hcOv_2OOX2WbjKzz4v-ho3zYKn8lCBt9CcGmTbG7Wl6uK6xZVmQWWm75Z6AEq8OWEf2VJcLfMQcADLSnrB2wOk-AHfrQSPQLWlxjv_L-Z/s1600/FechaConexao.png&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/AVvXsEg-jc84Dp-7l7ga_zr-oDzqOZ_DAqFFvFfALA0hcOv_2OOX2WbjKzz4v-ho3zYKn8lCBt9CcGmTbG7Wl6uK6xZVmQWWm75Z6AEq8OWEf2VJcLfMQcADLSnrB2wOk-AHfrQSPQLWlxjv_L-Z/s1600/FechaConexao.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&amp;nbsp; &amp;nbsp; &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;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
No próximo POST criaremos mais alguns métodos para a execução dos comandos SQL.&amp;nbsp;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://extremedonet.blogspot.com/feeds/2570261013648745167/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://extremedonet.blogspot.com/2012/08/criando-objeto-de-acesso-dados-para.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4975989812845545081/posts/default/2570261013648745167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4975989812845545081/posts/default/2570261013648745167'/><link rel='alternate' type='text/html' href='http://extremedonet.blogspot.com/2012/08/criando-objeto-de-acesso-dados-para.html' title='Criando objeto de acesso a dados para banco de dados  MySQL '/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06494412110259730814</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggKBv86AYjwtysI6CHoZEsiWbJHqJgMqFnyCnRiMdrv9lmvePpsjowxSZvTKpqgc6f0Kehi9UWWKCBPXn_HaibpghlVd30-esPwS2mZiVv9AJBZ4yHqUhVvaLsKEBuTso9rlJm0BqsMIlo/s72-c/AddReferencia.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4975989812845545081.post-5546595519169431018</id><published>2012-07-17T08:30:00.001-07:00</published><updated>2013-07-03T07:03:52.725-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="Algoritmo"/><category scheme="http://www.blogger.com/atom/ns#" term="Console"/><category scheme="http://www.blogger.com/atom/ns#" term="Programação"/><category scheme="http://www.blogger.com/atom/ns#" term="VB.NET"/><title type='text'>Usando Vetores</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
Neste Post&amp;nbsp;vamos&amp;nbsp;estudar&amp;nbsp;a utilização de Vetores em VB.NET.&lt;br /&gt;
Como primeiro exemplo, vou usar de uma aplicação do tipo &lt;strong&gt;Console&lt;/strong&gt;.&lt;/div&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/AVvXsEiBNCFQyXYbwTL5m1WWUuC2oPstaCg72bDhlamnMjkgV1VL28TzL5ubTwdFQgep2k-xokvA_JnmfPvuy3cPw70wZpmiKCUs7yYERIEPnv0yh8TdJQMYNFNx5Us6bvTKetyIiL9MY3j1_VIw/s1600/VetorInicio.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Menu new Project do Visual Studio 2010 para criação de uma aplicação Console.&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBNCFQyXYbwTL5m1WWUuC2oPstaCg72bDhlamnMjkgV1VL28TzL5ubTwdFQgep2k-xokvA_JnmfPvuy3cPw70wZpmiKCUs7yYERIEPnv0yh8TdJQMYNFNx5Us6bvTKetyIiL9MY3j1_VIw/s640/VetorInicio.png&quot; height=&quot;358&quot; title=&quot;&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;Após a criação do projeto da aplicação segui alguns passos para renomear o módulo no Solution Explorer. Você pode revisar acessando o Post &lt;/em&gt;&lt;a href=&quot;http://extremedonet.blogspot.com.br/2012/07/criando-uma-aplicacao-console-em-vbnet.html&quot; target=&quot;_blank&quot;&gt;&lt;em&gt;Criando aplicação Console VB.NET&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&amp;nbsp;.&lt;/em&gt;&lt;br /&gt;
&lt;br /&gt;
Seguindo os passos do exercício, vamos criar um vetor que receba o nome de 5 amigos. &lt;br /&gt;
Para dimensionar um vetor com essas características basta digitar:&lt;br /&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/AVvXsEjdNYEU-iQwChJIxpDfSBCvKu8_bsiIWVUNHzC5h7x3XNKRDcRN122xeHHHk6SxXYz2VlLt9sI2q_4nDMPrCbGLiLkzwFI1MweGqcjFGncXPzCf40QXY8kroOsVrnPe6ZRPA2VR0QCrOESi/s1600/declaracaoVetor.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Declaração de Vetor: DIM amigos(4) as string&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdNYEU-iQwChJIxpDfSBCvKu8_bsiIWVUNHzC5h7x3XNKRDcRN122xeHHHk6SxXYz2VlLt9sI2q_4nDMPrCbGLiLkzwFI1MweGqcjFGncXPzCf40QXY8kroOsVrnPe6ZRPA2VR0QCrOESi/s640/declaracaoVetor.png&quot; height=&quot;358&quot; title=&quot;&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Na linha indicada estamos fazendo: &lt;br /&gt;
Dim:&amp;nbsp;&lt;em&gt; dimensionar &lt;/em&gt;, amigos(4): &lt;em&gt;vetor com cinco posições contando a partir do zero, &lt;/em&gt;As String: &lt;em&gt;receberá uma cadeia de caracteres. &lt;/em&gt;&lt;br /&gt;
&lt;br /&gt;
Para atribuir um valor dado pelo usuário&amp;nbsp;à uma determinada posição do Vetor, vamos emitir uma mensagem usando o método WriteLine. &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/AVvXsEhdV5d7Q-_gqDhFOKgwkyE6FU8VeHNeRE1oiswroBAO9j2X289Rv7OWMPMkjupK3Jj9huS7qyc6c9vYdj0L8WfTcSlObfUc4u-f92M96uKYSeCjsdcXpWzEh39EOXXS8ZcYztvEmrG7d6kE/s1600/VetorRecebendoValor.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Console.WriteLine(&amp;quot;Digite o nome de um amigo&amp;quot;)    amigos(0) = Console.ReadLine()&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdV5d7Q-_gqDhFOKgwkyE6FU8VeHNeRE1oiswroBAO9j2X289Rv7OWMPMkjupK3Jj9huS7qyc6c9vYdj0L8WfTcSlObfUc4u-f92M96uKYSeCjsdcXpWzEh39EOXXS8ZcYztvEmrG7d6kE/s640/VetorRecebendoValor.png&quot; height=&quot;359&quot; title=&quot;&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Na linha : &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;amigos(0) = &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;Console&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;.ReadLine()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;Estamos atribuindo o valor digitado pelo o usuário ao índice 0 do Vetor. &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times;&quot;&gt;O índice 0 é a primeira posição de um vetor. &lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: Times; font-size: large;&quot;&gt;&lt;strong&gt;&lt;u&gt;Usando a estrutura de repetição &quot;Enquanto&quot; para preencher um Vetor.&lt;/u&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Para preencher o vetor usando um mecanismo de repetição vamos apenas acrescentar a instrução &lt;br /&gt;
While ao código e uma variável que faça o controle de vezes que a repetição será executada.&lt;br /&gt;
&lt;br /&gt;
Vamos chamar essa variável de contador. &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;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6CsyI2mdfrpvGgF_h2ZWYT5BBqQbvnPvtRhMd_kv_GckPMSS8AiWPTX-iNQE0LsCmDb-w5lbvzXT2N5ayUWJK2jezsiDZq44Lgk9RPhvXQzvt3j4vWgiE7fu4XDFJFmb1r9YnaKBvHir-/s1600/criandoRepeticao2.png&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/AVvXsEi6CsyI2mdfrpvGgF_h2ZWYT5BBqQbvnPvtRhMd_kv_GckPMSS8AiWPTX-iNQE0LsCmDb-w5lbvzXT2N5ayUWJK2jezsiDZq44Lgk9RPhvXQzvt3j4vWgiE7fu4XDFJFmb1r9YnaKBvHir-/s640/criandoRepeticao2.png&quot; height=&quot;358&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dessa forma, o algoritmo executará cinco vezes (de 0 até 4) o método WriteLine e a atribuição do nome digitado pelo o usuário a uma posição do vetor. &lt;br /&gt;
&lt;br /&gt;
Agora vamos fazer com que o algoritmo apresente os nomes digitados pelo usuário. &lt;br /&gt;
&lt;br /&gt;
Para apresentar os nomes que estão alocados no vetor foi utilizada uma nova estrutura de repetição para apresentar os nomes um a um. &lt;br /&gt;
&lt;br /&gt;
Note que foi zerado&amp;nbsp;o valor do contador pois quando a primeira estrutura de repetição for finalizada &lt;br /&gt;
o contador deverá ter o valor 5.&amp;nbsp;Como 5 é maior que 4 não entrará nenhuma vez no segunda estrutura de repetição.&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/AVvXsEg0o1LqSx31GwLYbmBAoHzKIhRTx1tfkMkIRjRw3sJupLQQlzBfBnedlotQXHQuoorECrIC3d1FxSReqoMjw5IaSJeHqx0s_ZycKYq6knH-CQyRWftGsVAB81WOwc_NEO4B1tc26Gz8EcPP/s1600/contRepeti%C3%A7%C3%A3o.png&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/AVvXsEg0o1LqSx31GwLYbmBAoHzKIhRTx1tfkMkIRjRw3sJupLQQlzBfBnedlotQXHQuoorECrIC3d1FxSReqoMjw5IaSJeHqx0s_ZycKYq6knH-CQyRWftGsVAB81WOwc_NEO4B1tc26Gz8EcPP/s640/contRepeti%C3%A7%C3%A3o.png&quot; height=&quot;358&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Não podemos esquecer que no final do algoritmo devemos incluir o &lt;strong&gt;&lt;u&gt;Console.ReadLine()&lt;/u&gt;&lt;/strong&gt; apenas para que o Console não feche a tela antes que o usuário possa ler o conteúdo. &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/AVvXsEhEBqEJ9FamroE9vyNrAxefecUyu4maIGExtm2e3_vPufEYOzyysMnSEaZaZpKWZ49r09ohY_j1QTP2WCwToJxiwgmUaa5UxsTdwga1jBa_FxRkzOT8WNEnNqtrhp7AfTTj4B61hQP8QQNl/s1600/Final.png&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/AVvXsEhEBqEJ9FamroE9vyNrAxefecUyu4maIGExtm2e3_vPufEYOzyysMnSEaZaZpKWZ49r09ohY_j1QTP2WCwToJxiwgmUaa5UxsTdwga1jBa_FxRkzOT8WNEnNqtrhp7AfTTj4B61hQP8QQNl/s640/Final.png&quot; height=&quot;358&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Agora é só executar pressionando F5.&lt;br /&gt;
&lt;br /&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/AVvXsEjSaDBcQdVdx9Pfgvjn3n5Zz1FwTSl9zic0GRnOzy-uqNZ6_abZpt6cTxwPxC5bnW2MuwjqdoCQ_uQF4q8hyJwqvhfCBUEhK00Rfdwe_YeVAgRUN66RJoyMtmn9TAm8aB0XGPVkO9mbe9H5/s1600/resultadoErrado.png&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/AVvXsEjSaDBcQdVdx9Pfgvjn3n5Zz1FwTSl9zic0GRnOzy-uqNZ6_abZpt6cTxwPxC5bnW2MuwjqdoCQ_uQF4q8hyJwqvhfCBUEhK00Rfdwe_YeVAgRUN66RJoyMtmn9TAm8aB0XGPVkO9mbe9H5/s640/resultadoErrado.png&quot; height=&quot;358&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Algo deu errado!!&lt;br /&gt;
&lt;br /&gt;
Na hora de exibir os nomes alocados no Vetor, o mesmo nome apareceu cinco vezes. &lt;br /&gt;
&lt;br /&gt;
A falha no algoritmo está na linha indicada:&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/AVvXsEi8f2nr8d3z44PDX_KvpeTJg-qaf9JyO8PXi26gBHuSYT3r4UVNKLTkgwvIOXTh73vLuLYD-xVxqIEdnwwDyFAJNi6TviRT_n7CAe7hie32x-qHa2emhaupWnA1u9IMItrjIuZUChQqzfu5/s1600/erro.png&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/AVvXsEi8f2nr8d3z44PDX_KvpeTJg-qaf9JyO8PXi26gBHuSYT3r4UVNKLTkgwvIOXTh73vLuLYD-xVxqIEdnwwDyFAJNi6TviRT_n7CAe7hie32x-qHa2emhaupWnA1u9IMItrjIuZUChQqzfu5/s640/erro.png&quot; height=&quot;358&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&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;amigos(0) = &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;Console&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;.ReadLine()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Indica que toda vez que o laço de repetição enquanto (while) é executado e o usuário digita um nome,&lt;br /&gt;
este nome é atribuído à mesma posição do vetor. (posição zero) &lt;br /&gt;
&lt;br /&gt;
Para resolver este problema basta trocar o zero, que está como índice do vetor, para a variável contador. &lt;br /&gt;
Assim, cada nome digitado será alocado em uma posição diferente do vetor até que ele esteja completo.&lt;br /&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/AVvXsEjHWGlOF2RzaLHJhyphenhyphenqXquSv0KKGrNdBDDS-BwAbWm7-dL_lX6NAXXi0BsYsMB-Orr1KtgDQfVfTqxwxLTk8Z9-I1F_0eorz8D3ceCzh3SQFac9K6AsVrn0k_fOsHRQYRIrD0j-WUimMhhMn/s1600/contador+certo.png&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/AVvXsEjHWGlOF2RzaLHJhyphenhyphenqXquSv0KKGrNdBDDS-BwAbWm7-dL_lX6NAXXi0BsYsMB-Orr1KtgDQfVfTqxwxLTk8Z9-I1F_0eorz8D3ceCzh3SQFac9K6AsVrn0k_fOsHRQYRIrD0j-WUimMhhMn/s640/contador+certo.png&quot; height=&quot;358&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Agora o resultado deve ser o seguinte:&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/AVvXsEilNErzqxhldhUfoieQ5JUdlFO3QdnjBQdeE6JS0bF4EpnscDoMuYvSs-bAf6ZmOl26z_Q8OjVHCv3xNdaOt6iEk67Sm3bkJrEcnSw4SgnYhQ4-cXawpSa_WOtZ-vSkjdniBQBwHPVf6Srj/s1600/ResultadoFinal.png&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/AVvXsEilNErzqxhldhUfoieQ5JUdlFO3QdnjBQdeE6JS0bF4EpnscDoMuYvSs-bAf6ZmOl26z_Q8OjVHCv3xNdaOt6iEk67Sm3bkJrEcnSw4SgnYhQ4-cXawpSa_WOtZ-vSkjdniBQBwHPVf6Srj/s640/ResultadoFinal.png&quot; height=&quot;358&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Para exibir essa linha separadora apenas incluí uma linha &lt;br /&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;Console&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;.WriteLine(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: x-small;&quot;&gt;&quot;---------- Mostrando os amigos -----------&quot;&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&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
antes de começar a segunda estrutura de repetição enquanto.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://extremedonet.blogspot.com/feeds/5546595519169431018/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://extremedonet.blogspot.com/2012/07/usando-vetores.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4975989812845545081/posts/default/5546595519169431018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4975989812845545081/posts/default/5546595519169431018'/><link rel='alternate' type='text/html' href='http://extremedonet.blogspot.com/2012/07/usando-vetores.html' title='Usando Vetores'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06494412110259730814</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBNCFQyXYbwTL5m1WWUuC2oPstaCg72bDhlamnMjkgV1VL28TzL5ubTwdFQgep2k-xokvA_JnmfPvuy3cPw70wZpmiKCUs7yYERIEPnv0yh8TdJQMYNFNx5Us6bvTKetyIiL9MY3j1_VIw/s72-c/VetorInicio.png" height="72" width="72"/><thr:total>1</thr:total><georss:featurename>Santo André - São Paulo, Brasil</georss:featurename><georss:point>-23.655314 -46.5320878</georss:point><georss:box>-23.888029 -46.8479448 -23.422599 -46.2162308</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4975989812845545081.post-6470477222668358362</id><published>2012-07-08T19:39:00.001-07:00</published><updated>2012-07-08T19:51:27.927-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="Algoritmo"/><category scheme="http://www.blogger.com/atom/ns#" term="Console"/><category scheme="http://www.blogger.com/atom/ns#" term="VB.NET"/><title type='text'>Criando uma aplicação Console em VB.NET com Visual Studio</title><content type='html'>&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;Olá pessoal! &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;Neste post vamos aprender a criar uma aplicação Console em VB.NET. Neste primeiro momento vamos utilizar um algoritmo que já estudamos com Visualg: O cálculo da média simples. &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;Dado três notas, o algoritmo deve fazer o cálculo da média simples e&amp;nbsp;mostrar-la aos usuários. &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #f3f3f3;&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;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Em primeiro lugar, veremos como criar um projeto de aplicação Console no Visual Studio.&lt;/span&gt; &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/AVvXsEg2u4NZpXm_yPDAAzIhDd2kjGHJKuWciCSbFSRtobHMB2kQG15GpzNgHWE86o2zCd5ODZzkBFEbIqr7f3D0wBJcy8FlDCup3R-jSddueT6uL8D61AzsPmpi4Aoe7XjJsvMcPR3fW6sD8q5y/s1600/Iniciar+projeto.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Criando um projeto Visual Studio 2010&quot; border=&quot;0&quot; height=&quot;337&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2u4NZpXm_yPDAAzIhDd2kjGHJKuWciCSbFSRtobHMB2kQG15GpzNgHWE86o2zCd5ODZzkBFEbIqr7f3D0wBJcy8FlDCup3R-jSddueT6uL8D61AzsPmpi4Aoe7XjJsvMcPR3fW6sD8q5y/s640/Iniciar+projeto.png&quot; title=&quot;&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;Clicando no&amp;nbsp;link indicado poderemos ver&amp;nbsp;um tela de seleção de tipos de projetos:&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/AVvXsEgx0NQPvi1_DaqtuXGMEMmA9jQ4vq_uXaRStXGB1rZh43DuCrXfKgqXKw3XCAZ-bU1g3SB8_yO0o2XtKUARVsImuHCTfhF2Uot-GZCKv5JI7iUNtTbHizJmub5c7CvMjpnWEpxIC5pSvKyM/s1600/Iniciar+projeto+2.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Seleção do tipo de projeto e local para a gravação do projeto&quot; border=&quot;0&quot; height=&quot;358&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx0NQPvi1_DaqtuXGMEMmA9jQ4vq_uXaRStXGB1rZh43DuCrXfKgqXKw3XCAZ-bU1g3SB8_yO0o2XtKUARVsImuHCTfhF2Uot-GZCKv5JI7iUNtTbHizJmub5c7CvMjpnWEpxIC5pSvKyM/s640/Iniciar+projeto+2.png&quot; title=&quot;&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #171717; color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;Nesta etapa é importante observarmos&amp;nbsp;alguns pontos:&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;&lt;span style=&quot;background-color: #444444;&quot;&gt;&lt;span style=&quot;color: #f3f3f3;&quot;&gt;
&lt;/span&gt;
&lt;/span&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #171717; color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;O&amp;nbsp;Tipo de linguagem de programação que usaremos. &lt;/span&gt;&lt;blockquote dir=&quot;ltr&quot; style=&quot;margin-right: 0px;&quot;&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: #171717; color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;O&amp;nbsp;Visual Studio é uma IDE de desenvolvimento com suporte&amp;nbsp;a várias linguagens, neste exercício usaremos VB.NET.&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;span style=&quot;background-color: #171717;&quot;&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;background-color: #171717;&quot;&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;
&lt;/span&gt;
&lt;/span&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #171717; color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;O Tipo de Projeto - Console Application.&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;background-color: #171717;&quot;&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;
&lt;/span&gt;
&lt;/span&gt;
&lt;li&gt;&lt;span style=&quot;background-color: #171717; color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;O Diretório onde será criado o projeto.&lt;/span&gt;&lt;/li&gt;
&lt;span style=&quot;background-color: #171717;&quot;&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/ol&gt;
&lt;span style=&quot;background-color: #171717; color: #f3f3f3; font-family: Verdana, 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; Você pode selecionar qualquer diretorio em seu computador, caso não modifique o Visual Studio gravará no diretório padrão que geralmente&amp;nbsp;é \Documents\Visual Studio 2010\Projects.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #171717;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #171717; color: #f3f3f3;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #171717; color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;Após confirmarmos a criação do projeto será criado um módulo com um método&amp;nbsp; &lt;em&gt;&lt;strong&gt;Main(). &lt;/strong&gt;&lt;/em&gt;Nesta postagem não iremos nos aprofundar nas definições de método, por hora é válido saber que ele executará o comportamento necessário de um algoritmo que calcula a média simples através de uma &lt;strong&gt;Entrada&lt;/strong&gt; (as notas que serão imputadas pelo usuário), através de um &lt;strong&gt;processamento&lt;/strong&gt; (a expressão matemática que realiza o cálculo, e por fim, uma &lt;strong&gt;Saída&lt;/strong&gt; (a mostra do resultado da média simples).&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/AVvXsEim1GC8SUq5-bzgz8R20e0nPJAzm3McozOdHffkfSTcyOoby4vvRqmJgutj6X1z0rF3YrVWqD2HN_rDflY7AMRr0S3lv_hjCDA_Tt8XGaU2Dk-mfKM-PDax1p3x4wJQLB16AMu7PHJzH8lf/s1600/M%C3%A9todo+Main.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Método Main &quot; border=&quot;0&quot; height=&quot;358&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim1GC8SUq5-bzgz8R20e0nPJAzm3McozOdHffkfSTcyOoby4vvRqmJgutj6X1z0rF3YrVWqD2HN_rDflY7AMRr0S3lv_hjCDA_Tt8XGaU2Dk-mfKM-PDax1p3x4wJQLB16AMu7PHJzH8lf/s640/M%C3%A9todo+Main.png&quot; title=&quot;&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;É recomendável que o módulo criado automaticamente pelo Visual Studio seja renomeado com um título mais sugestivo, algo que indique a funcionalidade do algoritmo.&amp;nbsp; Vamos renomear para &lt;strong&gt;Media&lt;/strong&gt;, &lt;strong&gt;sem acento&lt;/strong&gt;. &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;Para renomear de forma segura, utilizaremos o painel do &lt;strong&gt;Solution Explorer. &lt;/strong&gt;Clicando em cima do Module1 e pressionando F2 para renomear. &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;Aparecerá uma mensagem perguntando se gostaria de renomear todas as referências com o novo nome. Clique em Sim.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;(Se o Solution Explorer não estiver visível como na imagem, é possível torna-lo visível através das teclas de atalho Ctrl + Alt + L.)&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/AVvXsEhQ4w_yyjCQcvzzitowYLG9ZHJ10OoL5dpP2mzp8UymA3VLiF4RFHa6g1YNNwrHv7BJxU8fiNi9DMPjubrlWRE6AuH7KZAGpBft0_5U_bswmhKJI8kCuStzRsQ3_eajPrZpsdHH71ghvaHx/s1600/Renomear.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Alterar nome do módulo&quot; border=&quot;0&quot; height=&quot;358&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ4w_yyjCQcvzzitowYLG9ZHJ10OoL5dpP2mzp8UymA3VLiF4RFHa6g1YNNwrHv7BJxU8fiNi9DMPjubrlWRE6AuH7KZAGpBft0_5U_bswmhKJI8kCuStzRsQ3_eajPrZpsdHH71ghvaHx/s640/Renomear.png&quot; title=&quot;&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;Bom, agora chegou a hora de falarmos do código. &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;color: #f3f3f3;&quot;&gt;Assim como já desenvolvemos antes, precisaremos da declaração de algumas variáveis para o algoritmo armazenar as notas e mostrar o resultado.&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float: left; margin-right: 1em; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsdpIKe0CQN3FpPDc3V2aUen4q-x7_apgrd15qAaIF6Mcn-3JK8A8CjQpFwLJ7ryVjXIlxJXaCKNXD_2_S2Po1arwBHlncpvKH-jOt2r0SqRbZglz5qHb_oiUEVoL41pVQ9ryHmJcuqMFu/s1600/declaracao+de+variaveis.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;declaração de variáveis: Dim nota1 as decimal, dim nota2 as decimal, dim nota3 as decimal, dim media as decimal&quot; border=&quot;0&quot; height=&quot;358&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsdpIKe0CQN3FpPDc3V2aUen4q-x7_apgrd15qAaIF6Mcn-3JK8A8CjQpFwLJ7ryVjXIlxJXaCKNXD_2_S2Po1arwBHlncpvKH-jOt2r0SqRbZglz5qHb_oiUEVoL41pVQ9ryHmJcuqMFu/s640/declaracao+de+variaveis.png&quot; title=&quot;&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif; font-size: small;&quot;&gt;De acordo com o exemplo acima, as variáveis foram declaradas como decimal.&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif; font-size: small;&quot;&gt;Você pode checar os tipos de variáveis disponíveis em VB.NET no link &lt;/span&gt;&lt;a href=&quot;http://extremedonet.blogspot.com.br/2012/07/tipos-de-variaveis-em-vbnet.html&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;Tipos de variáveis em VB.NET&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;color: #f3f3f3;&quot;&gt;A palavra chave&lt;/span&gt; &lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;Dim&lt;/span&gt; &lt;span style=&quot;color: #eeeeee; font-size: small;&quot;&gt;significa dimensionar, ou simplesmente declarar na memória. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #eeeeee; font-family: Verdana, sans-serif; font-size: small;&quot;&gt;Quando declaramos uma variável estamos &quot;reservando&quot; um espaço na memória para receber unm determinado valor, neste caso um número decimal. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif; font-size: small;&quot;&gt;Não se preocupe se os nomes das variáveis ficarem sublinhadas com uma linha verde, essas linhas verdes são avisos que o Visual Studio emite. Eles, na maioria das vezes, indicam que algo pode não estar em conformidade mas não representam erros de sintaxe ou compilação. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;font-size: 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;&lt;span style=&quot;color: black; font-family: Times New Roman; font-size: small;&quot;&gt;&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;No exemplo a seguir o Visual Studio mostrará no painel &lt;strong&gt;&lt;em&gt;Error List &lt;/em&gt;&lt;/strong&gt;(Se ele não estiver aparecendo você poderá visualiza-lo através do menu &lt;strong&gt;&lt;em&gt;View&lt;/em&gt;&lt;/strong&gt;) um aviso&amp;nbsp;de que as variáveis ainda não foram utilizadas e não receberam valores.&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&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/AVvXsEjexlb0FOU_KIy5FE1jt1rOuOIjrdcRiluWQBX-q0-4qGCZa8L33Su8VC4_YLqEmISusRi3uRacZvQPywBes9IG8END3OUy4d5tWcNwn57txSC1HBYoP_pL8Jbc6dU8KHflsyK2HmVTd12D/s1600/error+list.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Lista de erros do Visual Studio 2010&quot; border=&quot;0&quot; height=&quot;236&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjexlb0FOU_KIy5FE1jt1rOuOIjrdcRiluWQBX-q0-4qGCZa8L33Su8VC4_YLqEmISusRi3uRacZvQPywBes9IG8END3OUy4d5tWcNwn57txSC1HBYoP_pL8Jbc6dU8KHflsyK2HmVTd12D/s640/error+list.png&quot; title=&quot;&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: 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;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 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;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 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;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 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;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 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;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 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;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 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;&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif; font-size: small;&quot;&gt;Quando há algum erro de compilação ou um erro de sintaxe no código o mesmo ficará sublinhado com uma linha vermelha, este erro impede a compilação do programa. &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif; font-size: small;&quot;&gt;Para emitir uma mensagem ao usuário, por exemplo, para pedir que digite uma nota, usaremos o método Escreva que no VB.NET é escrito da seguinte forma em uma aplicação console&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&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;&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;&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;color: black; font-family: Times New Roman; font-size: small;&quot;&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas;&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;.WriteLine(&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Digite
a primeira nota&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif; font-size: small;&quot;&gt;Podemos dizer que WriteLine equivale ao Escreval do Visualg; faz com que uma mensagem seja escrita utilizando uma nova linha. &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif; font-size: small;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;Já a palavra&lt;/span&gt; &lt;span style=&quot;color: #6fa8dc;&quot;&gt;Console&lt;/span&gt; &lt;span style=&quot;color: #f3f3f3;&quot;&gt;trás uma novidade para nós uma novidade. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;color: #f3f3f3; font-family: Consolas;&quot;&gt;Como VB.NET é uma linguagem que pode ser utilizada em aplicações Web, Desktop e em aplicações console, precisamos informar onde a mensagem seria exibida; neste caso em uma janela do tipo console.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;color: #f3f3f3; font-family: Consolas;&quot;&gt;Para recuperarmos um valor digitado por um usuário e atribuirmos a uma variável, usaremos o método ReadLine():&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Times, &amp;quot;Times New Roman&amp;quot;, serif; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black; font-family: Times, &amp;quot;Times New Roman&amp;quot;, serif; font-size: small;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background-color: #f3f3f3; font-family: Consolas; font-size: 14pt; mso-bidi-font-size: 9.5pt;&quot;&gt;nota1 = &lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.ReadLine()&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 14pt; mso-bidi-font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif; font-size: small;&quot;&gt;Agora, a novidade fica por conta de Nota1 estar recebendo o Console.ReadLine().&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 14pt; mso-bidi-font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif; font-size: small;&quot;&gt;(No VisualG era preciso colocar o nome da variável dentro do parenteses para que ela recebesse o valor).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;img alt=&quot;Métodos Escreva e leia no VB&quot; border=&quot;0&quot; height=&quot;358&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGV40qDynGrr887t832l-QxjiY52pU6ewgRRRlD_IuWmNsB8a5QO9sG7FfFzutC5ge62D0c7coAje-R795rxv8E3zLcpHM_VSjpyD0wHWkBLl6q3cfV7BsnzY_rx2StvDkfSrA6UX_9Gxj/s640/metodo+escreva.png&quot; title=&quot;&quot; width=&quot;640&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;A partir do momento que uma variável recebe valor, a linha de aviso que o Visual Studio havia colocado desaparecerá.&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;Basta repetir o procedimento para as outras variáveis para terminar o algoritmo. &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt 35.4pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: 14pt; mso-bidi-font-size: 9.5pt;&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 14pt; mso-bidi-font-size: 9.5pt;&quot;&gt;.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Digite a primeira nota&quot;&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;background-color: #f3f3f3; font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 14pt; mso-bidi-font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;nota1 = &lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.ReadLine()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;background-color: #f3f3f3; font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 14pt; mso-bidi-font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Digite a segunda nota&quot;&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;background-color: #f3f3f3; font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 14pt; mso-bidi-font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;nota2 = &lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.ReadLine()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;background-color: #f3f3f3; font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 14pt; mso-bidi-font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Digite a terceira nota&quot;&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;background-color: #f3f3f3; font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 14pt; mso-bidi-font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;nota3 = &lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.ReadLine()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;background-color: #f3f3f3; font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;background-color: #f3f3f3; font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 14pt; mso-bidi-font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;media = (nota1 + nota2 + nota3) / 3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;background-color: #f3f3f3; font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;background-color: #f3f3f3; font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 14pt; mso-bidi-font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Sua média é : &quot;&lt;/span&gt; &amp;amp; media)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&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/AVvXsEi3qNFY3_obvld0VXgEPsUamE2-dLbv0jdYNDzLzY5nU-tkKruNHYLIsuqaUc7scw9gMgXd3eCz3zeawjR5cxPitvUML-cbfkujM1q9xDV9pZNbs0OtPskA9-xOPcNGy63VgyOYZHLa0PaZ/s1600/comandos.png&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;358&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3qNFY3_obvld0VXgEPsUamE2-dLbv0jdYNDzLzY5nU-tkKruNHYLIsuqaUc7scw9gMgXd3eCz3zeawjR5cxPitvUML-cbfkujM1q9xDV9pZNbs0OtPskA9-xOPcNGy63VgyOYZHLa0PaZ/s640/comandos.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;o:p&gt;&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;Pronto! Terminado o algoritmo! Desta vez, a novidade ficou por conta do símbolo de concatenação. &lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;o:p&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;Observe que no Visualg a concatenação era feita através da vírgula. No VB.NET o símbolo utilizado é o de &amp;amp; (&quot;E&quot; comercial).&lt;/span&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;o:p&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 14pt; mso-bidi-font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;color: #2b91af;&quot;&gt;Console&lt;/span&gt;.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Sua média é : &quot;&lt;/span&gt; &amp;amp; media)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; mso-bidi-font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;Para visualizar o algoritmo em execução, basta pressionar F5. &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; mso-bidi-font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;O resultado deve ser o seguinte:&lt;/span&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&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/AVvXsEhBzdTZ-1RooOq9P7OtPus8dhDykLJFxOHh4R55QR7g8nF9c8TpViWRrY96bB8waZpsZ653pJxK-1Xl-ygleq7saosTWkjedpqbf__gFoXORCj0M4mWdb5DgM57o0z_XwONeCwBTJiud6xS/s1600/execu%C3%A7%C3%A3o.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;execução do algoritmo&quot; border=&quot;0&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBzdTZ-1RooOq9P7OtPus8dhDykLJFxOHh4R55QR7g8nF9c8TpViWRrY96bB8waZpsZ653pJxK-1Xl-ygleq7saosTWkjedpqbf__gFoXORCj0M4mWdb5DgM57o0z_XwONeCwBTJiud6xS/s640/execu%C3%A7%C3%A3o.png&quot; title=&quot;&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times;&quot;&gt;&lt;/span&gt;&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;OPS!! Algo parece ter dado errado!&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;Como a saída é muito rápida, tratando-se apenas de uma frase, o console é fechado rapidamente. &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;Para resolver este problema basta apenas acrescentar uma linha:&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;background-color: #f3f3f3;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: 14pt; line-height: 115%; mso-ansi-language: PT-BR; mso-bidi-font-size: 9.5pt; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;&quot;&gt;Console&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 14pt; line-height: 115%; mso-ansi-language: PT-BR; mso-bidi-font-size: 9.5pt; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;&quot;&gt;.ReadLine()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; line-height: 115%; mso-ansi-language: PT-BR; mso-bidi-font-size: 9.5pt; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;font-family: Times, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif;&quot;&gt;O console ficará aguardando o pressionar de alguma tecla para fechar a janela. Assim fica mais fácil de visualizar o resultado.&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&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/AVvXsEjAxtgFjKY8p3D-vRg_AMnfloKp80nRTfkC1luDG73Sr7nZzNHMTqElBCydwafT8E6bwz9BltCgMvNlCDc-5dROFN8jHJbswHDU4vaGPWjo_a3k_lrP6SM7uR6_me9A9WFcVMX7JBSh9cke/s1600/resultado.png&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;321&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAxtgFjKY8p3D-vRg_AMnfloKp80nRTfkC1luDG73Sr7nZzNHMTqElBCydwafT8E6bwz9BltCgMvNlCDc-5dROFN8jHJbswHDU4vaGPWjo_a3k_lrP6SM7uR6_me9A9WFcVMX7JBSh9cke/s640/resultado.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;div align=&quot;left&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&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&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;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;span style=&quot;color: #f3f3f3; font-family: Verdana, sans-serif; font-size: small;&quot;&gt;Até Mais!&lt;/span&gt; &lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://extremedonet.blogspot.com/feeds/6470477222668358362/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://extremedonet.blogspot.com/2012/07/criando-uma-aplicacao-console-em-vbnet.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4975989812845545081/posts/default/6470477222668358362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4975989812845545081/posts/default/6470477222668358362'/><link rel='alternate' type='text/html' href='http://extremedonet.blogspot.com/2012/07/criando-uma-aplicacao-console-em-vbnet.html' title='Criando uma aplicação Console em VB.NET com Visual Studio'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06494412110259730814</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2u4NZpXm_yPDAAzIhDd2kjGHJKuWciCSbFSRtobHMB2kQG15GpzNgHWE86o2zCd5ODZzkBFEbIqr7f3D0wBJcy8FlDCup3R-jSddueT6uL8D61AzsPmpi4Aoe7XjJsvMcPR3fW6sD8q5y/s72-c/Iniciar+projeto.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4975989812845545081.post-3608632925102346508</id><published>2012-07-05T13:44:00.001-07:00</published><updated>2012-07-08T16:43:22.910-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="Programação"/><category scheme="http://www.blogger.com/atom/ns#" term="VB.NET"/><title type='text'>Tipos de Variáveis em VB.NET.</title><content type='html'>&lt;h2&gt;




&lt;span style=&quot;color: #666666; font-family: Verdana, sans-serif;&quot;&gt;Tipos de Variáveis em VB.NET.&lt;/span&gt;&lt;/h2&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Boa tarde galera! &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Neste primeiro post do &lt;strong&gt;blog&amp;nbsp; &lt;/strong&gt;.NET Programmers Extreme, gostaria de mostrar as diferenças entre os tipos de varíáveis disponíveis no VB.NET.&lt;/span&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;style type=&quot;text/css&quot;&gt;
caption {
 color: #333333;
}
table {
 border-collapse:collapse;
 text-align: center;
 font-family: Verdana, Geneva, sans-serif;
}
&lt;/style&gt;


&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;1&quot; cellspacing=&quot;1&quot; style=&quot;width: 100%;&quot;&gt;
  &lt;caption&gt;
    Tipos de Variáveis em VB.NET
  &lt;/caption&gt;
  &lt;tbody&gt;
&lt;tr bgcolor=&quot;#999999&quot;&gt;
    &lt;td width=&quot;82&quot;&gt;Tipo de Variável&lt;/td&gt;
    &lt;td width=&quot;149&quot;&gt;Tamanho&lt;/td&gt;
    &lt;td width=&quot;371&quot;&gt;Range&lt;/td&gt;
    &lt;td width=&quot;244&quot;&gt;Situação exemplo&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;Byte&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;1 Byte&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;0 a 255 (sem sinal)&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;Dim ID as Byte&lt;br /&gt;
ID = 16&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;Short&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;2 Bytes&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;- 32.768 até 32.767&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;Dim rendimentos as Shor&lt;br /&gt;
rendimentos = -10&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;Integer&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;4 Bytes&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;- 2.147.483.648 até 2.147.483.647&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;Dim habitantes as Integer&lt;br /&gt;
habitantes = 150000000&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;Long &lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;8 Bytes&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;- 9.223.372.036.854.775.808 até 9.223.372.036.854.775.807&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;Dim Celulas as Long&lt;br /&gt;
Celulas = 12345768009&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;Single&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;4 Bytes&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;- 3,402823 x 1038 to -1.401298 x 10-45 (valores negativos)&lt;br /&gt;
1,401298 x 10-45 a 3,402823 x 1038 (valores positivos)&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;Dim valor as Single&lt;br /&gt;
valor = 1457,42&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;Double&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;8 Bytes&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;± 79.228.162.514.264.337.593.543.950.335 (sem ponto decimal)&lt;br /&gt;
± 7,9228162514264337593543950335 (com 28 casas decimais)&lt;br /&gt;
Menor valor representável: ± 0,0000000000000000000000000001&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;Dim DEBITO as Decimal&lt;br /&gt;
DEBITO = 1387987,34&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;Char&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;2 Bytes&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;0 até 65.535 caracteres&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;Dim SEXO as Char&lt;br /&gt;
SEXO = “M”&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;String&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;10 Bytes + 2 X quantidade de caracteres&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;0 até aproximadamente dois bilhões de caracteres Unicode&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;Dim NOME as String&lt;br /&gt;
NOME = “José da Silva”&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;Boolean&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;4 Bytes&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;True ou False&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;Dim Ativo as Boolean&lt;br /&gt;
Ativo = True&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;Date&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;8 Bytes &lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;1 de janeiro de 0001 a 31 de dezembro de 9999&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;Dim DataNascimento as Date&lt;br /&gt;
DataNascimento = #14/10/1982#&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;Object&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;4 Bytes&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;Qualquer tipo pode ser armazenado em uma variável do tipo Object&lt;/td&gt;
    &lt;td bgcolor=&quot;#333333&quot;&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
    &lt;td&gt;&lt;/td&gt;
    &lt;td&gt;&lt;/td&gt;
    &lt;td&gt;&lt;/td&gt;
    &lt;td&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://extremedonet.blogspot.com/feeds/3608632925102346508/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://extremedonet.blogspot.com/2012/07/tipos-de-variaveis-em-vbnet.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4975989812845545081/posts/default/3608632925102346508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4975989812845545081/posts/default/3608632925102346508'/><link rel='alternate' type='text/html' href='http://extremedonet.blogspot.com/2012/07/tipos-de-variaveis-em-vbnet.html' title='Tipos de Variáveis em VB.NET.'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/06494412110259730814</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>