<?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-230222142169020147</id><updated>2024-12-18T20:19:46.916-08:00</updated><title type='text'>VB.Net Tips and Tricks</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://vbdotnettips.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://vbdotnettips.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>jivangoyal</name><uri>http://www.blogger.com/profile/12853371042810428434</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>45</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-230222142169020147.post-4051111328200369914</id><published>2010-11-18T01:06:00.000-08:00</published><updated>2010-11-18T01:07:59.164-08:00</updated><title type='text'>Partial Class &amp; Partial Method</title><content type='html'>It is possible to split the definition of a &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/0b0thckt.aspx&quot;&gt;class&lt;/a&gt; or a &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ah19swz4.aspx&quot;&gt;struct&lt;/a&gt;, an &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/87d83y5b.aspx&quot;&gt;interface&lt;/a&gt;  or a method over two or more source files. Each source file contains a  section of the type or method definition, and all parts are combined  when the application is compiled.&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;br /&gt;
File:f1.vb&lt;br /&gt;
Public Interface I1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;background-color: #f1c232;&quot;&gt; Sub setMsg()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #f1c232;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Function getMsg() As String&lt;/span&gt;&lt;br /&gt;
End Interface&lt;br /&gt;
&lt;br /&gt;
File:f2.vb &lt;br /&gt;
Partial Public Class C1&lt;br /&gt;
&lt;span style=&quot;background-color: #f1c232;&quot;&gt;Implements I1&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
End Class&lt;br /&gt;
&lt;br /&gt;
File:f3.vb&lt;br /&gt;
Partial Class C1&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Partial Private Sub myTestFunc()&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;End Sub&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
End Class&lt;br /&gt;
&lt;br /&gt;
File:f4.vb &lt;br /&gt;
Partial Public Class C1&lt;br /&gt;
&lt;div style=&quot;background-color: #ffd966;&quot;&gt;Public Sub setMsg() Implements I1.setMsg&lt;/div&gt;&lt;div style=&quot;background-color: #f1c232;&quot;&gt;------------&lt;/div&gt;&lt;div style=&quot;background-color: #f1c232;&quot;&gt;-------------&lt;/div&gt;&lt;span style=&quot;background-color: #f1c232;&quot;&gt;End Sub&lt;/span&gt;&lt;br /&gt;
End Class&lt;br /&gt;
&lt;br /&gt;
File:f5.vb&lt;br /&gt;
Partial Public Class C1&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #f1c232;&quot;&gt;Public Function getMsg() As String Implements I1.getMsg&lt;/div&gt;&lt;div style=&quot;background-color: #f1c232;&quot;&gt;------------&lt;/div&gt;&lt;div style=&quot;background-color: #f1c232;&quot;&gt;-------------&lt;/div&gt;&lt;div style=&quot;background-color: #f1c232;&quot;&gt;End Function&lt;/div&gt;End Class&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File:f6.vb&lt;br /&gt;
Public Class C1&lt;br /&gt;
&lt;b&gt;Private Sub myTestFunc()&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;------------&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;------------- &lt;/b&gt;&lt;br /&gt;
&lt;b&gt;End Sub&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
End Class&lt;br /&gt;
&lt;br /&gt;
reference:&lt;br /&gt;
http://www.4guysfromrolla.com/articles/071509-1.aspx</content><link rel='replies' type='application/atom+xml' href='http://vbdotnettips.blogspot.com/feeds/4051111328200369914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/230222142169020147/4051111328200369914' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/4051111328200369914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/4051111328200369914'/><link rel='alternate' type='text/html' href='http://vbdotnettips.blogspot.com/2010/11/partial-class-partial-method.html' title='Partial Class &amp; Partial Method'/><author><name>jivangoyal</name><uri>http://www.blogger.com/profile/12853371042810428434</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-230222142169020147.post-3298684268244758667</id><published>2010-10-26T03:54:00.000-07:00</published><updated>2010-10-26T03:54:19.979-07:00</updated><title type='text'>Compress/Decompress byte streams</title><content type='html'>&lt;blockquote&gt;Imports System.IO&lt;br /&gt;
Imports System.IO.Compression&lt;br /&gt;
&lt;br /&gt;
Public NotInheritable Class Compressor&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Private Sub New()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Shared Function Compress(data As Byte()) As Byte()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Dim output As New MemoryStream()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Dim gzip As New GZipStream(output, CompressionMode.Compress, True)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; gzip.Write(data, 0, data.Length)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; gzip.Close()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Return output.ToArray()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Function&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Shared Function Decompress(data As Byte()) As Byte()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Dim input As New MemoryStream()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; input.Write(data, 0, data.Length)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; input.Position = 0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Dim gzip As New GZipStream(input, CompressionMode.Decompress, True)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Dim output As New MemoryStream()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Dim buff As Byte() = New Byte(63) {}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Dim read As Integer = -1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; read = gzip.Read(buff, 0, buff.Length)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; While read &amp;gt; 0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; output.Write(buff, 0, read)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; read = gzip.Read(buff, 0, buff.Length)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; End While&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; gzip.Close()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Return output.ToArray()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Function&lt;br /&gt;
End Class&lt;br /&gt;
&amp;nbsp;&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbdotnettips.blogspot.com/feeds/3298684268244758667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/230222142169020147/3298684268244758667' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/3298684268244758667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/3298684268244758667'/><link rel='alternate' type='text/html' href='http://vbdotnettips.blogspot.com/2010/10/compressdecompress-byte-streams.html' title='Compress/Decompress byte streams'/><author><name>jivangoyal</name><uri>http://www.blogger.com/profile/12853371042810428434</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><entry><id>tag:blogger.com,1999:blog-230222142169020147.post-6938122398480601735</id><published>2010-09-16T05:24:00.000-07:00</published><updated>2010-09-16T05:24:51.487-07:00</updated><title type='text'>Anonymous Types</title><content type='html'>Anonymous types:&amp;nbsp; As the name itself clears, creates an object  without declaring its data type/class. Since name of the data type/class is not  specified --that the type is referred to as an anonymous type.&lt;br /&gt;
&lt;br /&gt;
VB.Net &lt;br /&gt;
&lt;blockquote&gt;Person = New With {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; .FirstName = &quot;Ram&quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; .MiddleName = &quot;Gopal&quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; .LastName = &quot;Verma&quot; }&lt;/blockquote&gt;C# &lt;br /&gt;
&lt;blockquote&gt;&amp;nbsp;var Person = New With {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstName = &quot;Ram&quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; MiddleName = &quot;Gopal&quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; LastName = &quot;Verma&quot; };&lt;/blockquote&gt;Above example is one of&amp;nbsp; declaration of anonymous typed object where once a person object is created then this object is used as if object of some of real physical class.&lt;br /&gt;
&lt;br /&gt;
During compilation while the control reached at above code then the following are the steps that are performed internally. &lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Compiler automatically generates anonymous class. &lt;/li&gt;
&lt;li&gt;It anonymously instantiate an object that contains the properties in anonymous type &lt;/li&gt;
&lt;li&gt;The instantiated object is assigned to the anonymous type variable &quot;Person&quot;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;&amp;nbsp;The anonymous type inherits from Object, it holds the properties specified in declaring the object.&lt;br /&gt;
&lt;br /&gt;
So object of anonymous&amp;nbsp; type are used as of a normal class.</content><link rel='replies' type='application/atom+xml' href='http://vbdotnettips.blogspot.com/feeds/6938122398480601735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/230222142169020147/6938122398480601735' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/6938122398480601735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/6938122398480601735'/><link rel='alternate' type='text/html' href='http://vbdotnettips.blogspot.com/2010/09/anonymous-types.html' title='Anonymous Types'/><author><name>jivangoyal</name><uri>http://www.blogger.com/profile/12853371042810428434</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-230222142169020147.post-2308932393087946464</id><published>2010-09-16T05:01:00.000-07:00</published><updated>2010-09-16T05:01:40.747-07:00</updated><title type='text'>Marker Interface</title><content type='html'>An interface that consists of no method....... or an interface having nothing in the body is called marker interface. These interfaces can be useful in the scenarios while we need to mark some kind of implementations of derived class objects for different kinds of behavior.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;e.g Let C be a class&lt;br /&gt;
&lt;br /&gt;
C1 and C2 inherits C and also C2 implements Imarker interface.&amp;nbsp;&lt;/blockquote&gt;now suppose the object to be realistic in real world and the objects of class that implements Imarker interface are always intelligent entities.&lt;br /&gt;
&lt;br /&gt;
now let 5 objects of C1 and 3 objects of C2 go for competition and clearly objects of C2 are winner. Then to check which object is winner which is not, instead of checking property of individual we just will check which is object is assignable to reference of Imarker interface. which removes lot of checks in case of complex scenarios.</content><link rel='replies' type='application/atom+xml' href='http://vbdotnettips.blogspot.com/feeds/2308932393087946464/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/230222142169020147/2308932393087946464' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/2308932393087946464'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/2308932393087946464'/><link rel='alternate' type='text/html' href='http://vbdotnettips.blogspot.com/2010/09/marker-interface.html' title='Marker Interface'/><author><name>jivangoyal</name><uri>http://www.blogger.com/profile/12853371042810428434</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-230222142169020147.post-1543575781344984260</id><published>2010-09-16T04:47:00.000-07:00</published><updated>2010-09-16T04:49:15.532-07:00</updated><title type='text'>Comparing instance is type of a class</title><content type='html'>There are various kinds of ways to check whether a object is instance of given class or not. The following are some of the ways that has been identified to be find this condition&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;Public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Interface&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;MyMarkerInterface&lt;/span&gt;
 
&lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Interface&lt;/span&gt;
 
&lt;span style=&quot;color: blue;&quot;&gt;Public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Class&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;myTestCls&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Implements&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;MyMarkerInterface&lt;/span&gt;&lt;/pre&gt;&lt;/blockquote&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Private&lt;/span&gt;&amp;nbsp;_m&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Integer&lt;/span&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;ReadOnly&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Property&lt;/span&gt;&amp;nbsp;Age()&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Integer&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Get&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Return&lt;/span&gt;&amp;nbsp;_m
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Get&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Property&lt;/span&gt;
 
&lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Class&lt;/span&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;
The above is the class that implements some interface........ So in some case I want to check whether the instance of above class is instance of Interface.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
&lt;pre style=&quot;font-family: consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Private&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Function&lt;/span&gt;&amp;nbsp;isMarkerkedObj1(&lt;span style=&quot;color: blue;&quot;&gt;ByVal&lt;/span&gt;&amp;nbsp;o1&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;myTestCls&lt;/span&gt;)&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Boolean&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;If&lt;/span&gt;&amp;nbsp;&lt;u&gt;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;TypeOf&lt;/span&gt;&amp;nbsp;o1&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Is&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;MyMarkerInterface&lt;/span&gt;&amp;nbsp;&lt;/b&gt;&lt;/i&gt;&lt;/u&gt;&lt;span style=&quot;color: blue;&quot;&gt;Then&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Return&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;True&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Else&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Return&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;False&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;If&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Function&lt;/span&gt;
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Private&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Function&lt;/span&gt;&amp;nbsp;isMarkerkedObj2(&lt;span style=&quot;color: blue;&quot;&gt;ByVal&lt;/span&gt;&amp;nbsp;o1&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;myTestCls&lt;/span&gt;)&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Boolean&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;If&lt;/span&gt;&amp;nbsp;&lt;u&gt;&lt;i&gt;&lt;b&gt;o1.GetType.IsSubclassOf(&lt;span style=&quot;color: blue;&quot;&gt;GetType&lt;/span&gt;(&lt;span style=&quot;color: #2b91af;&quot;&gt;MyMarkerInterface&lt;/span&gt;))&lt;/b&gt;&lt;/i&gt;&lt;/u&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Then&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Return&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;True&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Else&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Return&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;False&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;If&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Function&lt;/span&gt;
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Private&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Function&lt;/span&gt;&amp;nbsp;isMarkerkedObj3(&lt;span style=&quot;color: blue;&quot;&gt;ByVal&lt;/span&gt;&amp;nbsp;o1&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #2b91af;&quot;&gt;myTestCls&lt;/span&gt;)&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Boolean&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;If&lt;/span&gt;&amp;nbsp;&lt;i&gt;&lt;u&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;GetType&lt;/span&gt;(&lt;span style=&quot;color: #2b91af;&quot;&gt;MyMarkerInterface&lt;/span&gt;).IsAssignableFrom(o1.GetType)&amp;nbsp;&lt;/b&gt;&lt;/u&gt;&lt;/i&gt;&lt;span style=&quot;color: blue;&quot;&gt;Then&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Return&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;True&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Else&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Return&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;False&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;If&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Function&lt;/span&gt;&lt;/pre&gt;&lt;/blockquote&gt;Now all the above methods are using different methods to compare the type of object to check is this type of particular kind .&lt;br /&gt;
&lt;br /&gt;
e.g. Dim obj1 as new myTestCls&lt;br /&gt;
&lt;pre style=&quot;font-family: consolas;&quot;&gt;&lt;span style=&quot;color: #2b91af;&quot;&gt;&lt;/span&gt;-------------&lt;/pre&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;&lt;span style=&quot;color: #2b91af;&quot;&gt;&lt;/span&gt;-------------&amp;nbsp;&lt;/pre&gt;&lt;pre style=&quot;font-family: consolas;&quot;&gt;&lt;span style=&quot;color: #2b91af;&quot;&gt;&lt;/span&gt;-------------
isMarkerkedObj1(obj1)
isMarkerkedObj2(obj1)
isMarkerkedObj3(obj1)&lt;/pre&gt;&lt;br /&gt;
all the above calls will return true.&lt;br /&gt;
&lt;br /&gt;
Note: The requirement discussed might be confusing but is very useful in many scenarios a the interface used is a marker interface which consists of nothing in the body. So in certain cases we may require to mark some objects for certain behavior then we use this interface.</content><link rel='replies' type='application/atom+xml' href='http://vbdotnettips.blogspot.com/feeds/1543575781344984260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/230222142169020147/1543575781344984260' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/1543575781344984260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/1543575781344984260'/><link rel='alternate' type='text/html' href='http://vbdotnettips.blogspot.com/2010/09/comparing-instance-is-type-of-class.html' title='Comparing instance is type of a class'/><author><name>jivangoyal</name><uri>http://www.blogger.com/profile/12853371042810428434</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-230222142169020147.post-6715161993897020374</id><published>2010-09-01T01:09:00.001-07:00</published><updated>2010-09-01T01:20:52.009-07:00</updated><title type='text'>What is a Manifest?</title><content type='html'>All the &lt;a href=&quot;http://www.amazon.com/PROGRAMMING-VISUAL-BASIC-DOT-CORE/dp/B00006HWPM?ie=UTF8&amp;amp;tag=development01-20&amp;amp;link_code=btl&amp;amp;camp=213689&amp;amp;creative=392969&quot; target=&quot;_blank&quot;&gt;metadata &lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=development01-20&amp;amp;l=btl&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=B00006HWPM&quot; style=&quot;border: medium none ! important; margin: 0px ! important; padding: 0px ! important;&quot; width=&quot;1&quot; /&gt;needed to specify the assembly&#39;s version requirements and security identity. Metadata is needed to define the scope of the assembly and resolve references to resources and classes. &lt;br /&gt;
&lt;br /&gt;
It can be stored in either a PE (Portable Executable) file (an .exe or .dll) with Microsoft intermediate language (MSIL) code or in a standalone PE (Portable Executable) file that contains only assembly manifest information.&lt;br /&gt;
&lt;br /&gt;
The information contained in the assembly manifest&lt;br /&gt;
I. &lt;b&gt;Assembly&#39;s identity: &lt;/b&gt;The first four items — 1. the assembly name 2. version number 3. culture 4. and strong name information.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;1. Assembly name: A text string specifying the assembly&#39;s name.&lt;br /&gt;
2. Version number: A major and minor version number, and a revision and build number. The common language runtime uses these numbers to enforce version policy.&lt;br /&gt;
3. Culture: Information on the culture or language the assembly supports. This information should be used only to designate an assembly as a satellite assembly containing culture- or language-specific information. (An assembly with culture information is automatically assumed to be a satellite assembly.)&lt;br /&gt;
4. Strong name information: The public key from the publisher if the assembly has been given a strong name.&lt;/blockquote&gt;&lt;br /&gt;
II. &lt;b&gt;List of all files in the assembly&lt;/b&gt;: A hash of each file contained in the assembly and a file name. Note that all files that make up the assembly must be in the same directory as the file containing the assembly manifest.&lt;br /&gt;
&lt;br /&gt;
III.&lt;b&gt; Type reference information&lt;/b&gt;: Information used by the runtime to map a type reference to the file that contains its declaration and implementation. This is used for types that are exported from the assembly.&lt;br /&gt;
&lt;br /&gt;
IV. &lt;b&gt;Information on referenced assemblies&lt;/b&gt;: A list of other assemblies that are statically referenced by the assembly. Each reference includes the dependent assembly&#39;s name, assembly metadata (version, culture, operating system, and so on), and public key, if the assembly is strong named.</content><link rel='replies' type='application/atom+xml' href='http://vbdotnettips.blogspot.com/feeds/6715161993897020374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/230222142169020147/6715161993897020374' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/6715161993897020374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/6715161993897020374'/><link rel='alternate' type='text/html' href='http://vbdotnettips.blogspot.com/2010/09/what-is-manifest.html' title='What is a Manifest?'/><author><name>jivangoyal</name><uri>http://www.blogger.com/profile/12853371042810428434</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-230222142169020147.post-8995686203847189170</id><published>2010-05-27T02:23:00.000-07:00</published><updated>2010-05-27T02:24:18.590-07:00</updated><title type='text'>Private Assemblies</title><content type='html'>&lt;span id=&quot;ctl00_ContentPlaceHolder1_GridViewMessages_ctl02_LabelThreadMessage&quot;&gt;&lt;!--Content type: HTML. Transform: webcollection2mtps.xslt.--&gt;  &lt;p&gt;A private assembly is an assembly that is deployed with an  application and is available for the exclusive use of that application.  That is, other applications do not share the private assembly. Private  assemblies are one of the methods that can be used to create  isolated  applications. For more information, see  About  Isolated Applications and Side-by-Side Assemblies.&lt;/p&gt; &lt;p&gt;Private assemblies must be designed to work side-by-side with other  versions of the assembly on the system. For more information, see  Guidelines  for Creating Side-by-side Assemblies.&lt;/p&gt; &lt;p&gt;Private assemblies must be accompanied by an  assembly  manifest. Note that name restrictions apply when packaging a DLL as  a private assembly to accommodate the way in which Windows searches for  private assemblies. When searching for private assemblies, the  recommended method is to include the assembly manifest in the DLL as a  resource. In this case, the resource ID must equal 1 and the name of the  private assembly may be the same as the name of the DLL. For example,  if the name of the DLL is MICROSOFT.WINDOWS.MYSAMPLE.DLL, the value of  the name attribute used in the &lt;strong&gt;assemblyIdentity&lt;/strong&gt; element  of the manifest may also be Microsoft.Windows.mysample. An alternate  method of searching for private assemblies is to provide the assembly  manifest in a separate file. In this case, the name of the assembly and  its manifest must be different than the name of the DLL. For example,  Microsoft.Windows.mysampleAsm, Microsoft.Windows.mysampleAsm.manifest,  and Microsoft.Windows.mysample.dll. For more information about how  side-by-side searches for private assemblies see  Assembly  Searching Sequence.&lt;/p&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbdotnettips.blogspot.com/feeds/8995686203847189170/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/230222142169020147/8995686203847189170' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/8995686203847189170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/8995686203847189170'/><link rel='alternate' type='text/html' href='http://vbdotnettips.blogspot.com/2010/05/private-assemblies.html' title='Private Assemblies'/><author><name>jivangoyal</name><uri>http://www.blogger.com/profile/12853371042810428434</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-230222142169020147.post-5095146680331673135</id><published>2010-05-27T02:16:00.000-07:00</published><updated>2010-05-27T02:24:39.672-07:00</updated><title type='text'>Static Assemblies v/s Dynamic Assemlies Tips</title><content type='html'>Static Assembly&lt;br /&gt;- Stored on disc in PE files&lt;br /&gt;- contains .NET Framework types (interfaces and classes) as&lt;br /&gt;well as resources for the assembly (bitmaps, JPEG files,&lt;br /&gt;resource files, and so on)&lt;br /&gt;&lt;br /&gt;Dynamic Assembly&lt;br /&gt;- Not saved on disc before execution and run directly from memory but can be saved on disc after execution&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What else please make comments</content><link rel='replies' type='application/atom+xml' href='http://vbdotnettips.blogspot.com/feeds/5095146680331673135/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/230222142169020147/5095146680331673135' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/5095146680331673135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/5095146680331673135'/><link rel='alternate' type='text/html' href='http://vbdotnettips.blogspot.com/2010/05/static-assemblies-vs-dynamic-assemlies.html' title='Static Assemblies v/s Dynamic Assemlies Tips'/><author><name>jivangoyal</name><uri>http://www.blogger.com/profile/12853371042810428434</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-230222142169020147.post-2202418385753978340</id><published>2010-05-27T02:15:00.001-07:00</published><updated>2010-05-27T02:15:50.936-07:00</updated><title type='text'>Assembly Manifest Definition Tips</title><content type='html'>-A Data Structure responsible to store inforamtion about assembly i.e. metadata.&lt;br /&gt;-metadata contain various information like: assembly&#39;s version, security identity and other metadata needed to define the scope of assembly and resolve references to resources and classes.&lt;br /&gt;- can be stored in a PE file (DLL/EXE) with Microsoft Intermediate Language (MSIL) or in standalone PE file that contains only assembly manifest information.&lt;br /&gt;-contains a collection of data that describes how the elements in the assembly relate to each other</content><link rel='replies' type='application/atom+xml' href='http://vbdotnettips.blogspot.com/feeds/2202418385753978340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/230222142169020147/2202418385753978340' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/2202418385753978340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/2202418385753978340'/><link rel='alternate' type='text/html' href='http://vbdotnettips.blogspot.com/2010/05/assembly-manifest-definition-tips.html' title='Assembly Manifest Definition Tips'/><author><name>jivangoyal</name><uri>http://www.blogger.com/profile/12853371042810428434</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-230222142169020147.post-6327226876435735424</id><published>2010-03-24T02:25:00.000-07:00</published><updated>2010-03-24T03:00:12.755-07:00</updated><title type='text'>Managed Modules- Windows Portable Executable (PE)</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFNnYRwo5q6y98wkF72zrcFKXinQVnA-s48zoRjzCbMXWMON_XNqbKRrKt3TMU7e2x5Kttt4jP4ppNfJkdAItx-P4-VAYwwnIOTCQTooe-0NIIAZaPJK_XSo2nC8wGUfupTzeiavErXxDV/s1600/ManagedModule+PE.GIF&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 230px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFNnYRwo5q6y98wkF72zrcFKXinQVnA-s48zoRjzCbMXWMON_XNqbKRrKt3TMU7e2x5Kttt4jP4ppNfJkdAItx-P4-VAYwwnIOTCQTooe-0NIIAZaPJK_XSo2nC8wGUfupTzeiavErXxDV/s320/ManagedModule+PE.GIF&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5452129532875412914&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;The above diagram shows the resulting a managed module. A managed module is a standard Windows portable executable (PE) file that requires the CLR to execute. In the future, other operating systems may use the PE file format as well.&lt;br /&gt;&lt;br /&gt;A Managed Module is composed of the following parts:&lt;table style=&quot;width: 451px; height: 741px;&quot;&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;br /&gt;Part&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;br /&gt;Description&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;PE header &lt;/td&gt;&lt;br /&gt;&lt;td&gt;This is the standard Windows PE file header, which is similar to the Common Object File Format (COFF) header. The PE header indicates the type of file--GUI, CUI, or DLL—and also has a timestamp indicating when the file was built. For modules that contain only IL code (see below, Intermediate Language Code), the bulk of the information in the PE header is ignored. For modules that contain native CPU code, this header contains&lt;br /&gt;information about the native CPU code. &lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;CLR header &lt;/td&gt;&lt;br /&gt;&lt;td&gt;This header contains the information (interpreted by the CLR and utilities) that makes this a managed module. It includes the version of the CLR required, some flags, the MethodDef metadata token of the managed module’s entry point method (Main method), and the location/size of the module’s metadata, resources, strong name, some flags, and other less interesting stuff. &lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;Metadata &lt;/td&gt;&lt;br /&gt;&lt;td&gt;Every managed module contains metadata tables, of which there are 2 main types: those that describe the types and members defined in your source code, and those that describe the types and members referenced by your source code.  &lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;Intermediate Language (IL) Code &lt;/td&gt;&lt;br /&gt;&lt;td&gt;This is the code that was produced by the compiler as it compiled the source&lt;br /&gt;code. IL is later compiled by the CLR into native CPU instructions.  &lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Most compilers of the past produced code targeted to a specific CPU architecture, such as x86, IA64, Alpha, or PowerPC. All CLR-compliant compilers produce intermediate language (IL) code instead. IL code is sometimes referred to as managed code, because its lifetime and execution are managed by the CLR.&lt;br /&gt;&lt;br /&gt;Metadata is simply a set of data tables that describe what is defined in the module, such as types and their members. Also it has tables indicating what the managed module references, such as imported types and their members. Metadata is a superset of older technologies such as type libraries and IDL files.&lt;br /&gt;&lt;br /&gt;The important thing to note is that CLR metadata is far more complete than its predecessors. And, unlike type libraries and IDL, metadata is always associated with the file that contains the IL code. In fact, the metadata is always embedded in the same EXE/DLL as the code, making it impossible to separate the two. Since the metadata and code are produced by the compiler at the same time and are bound into the resulting managed module, the metadata and the IL code it describes are never out of sync with one another.&lt;br /&gt;&lt;br /&gt;Metadata has many uses. Here are some of them:&lt;br /&gt;·  Metadata removes the need for header and library files when compiling, because all the information about the referenced types/members is contained in one file along with the IL that implements those type/members. Compilers can read metadata directly from managed modules.&lt;br /&gt;&lt;br /&gt;·  Visual Studio uses metadata to help you write code. Its IntelliSense feature parses metadata to tell you what methods a type offers and what parameters that method expects.&lt;br /&gt;&lt;br /&gt;·  The CLR code verification process uses metadata to ensure that your code performs only “safe” operations. Verification is discussed shortly.&lt;br /&gt;&lt;br /&gt;·  Metadata allows an object’s fields to be serialized into a memory block, remoted to another machine, and then deserialized, recreating the object and its state on the remote machine.&lt;br /&gt;&lt;br /&gt;·  Metadata allows the garbage collector to track the lifetime of objects. For any object, the garbage collector can determine the type of the object, and from the metadata it knows which fields within that object refer to other objects.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Four of the compilers that Microsoft offers--C#, Visual Basic, JScript, and the IL Assembler--always produce managed modules, which require the CLR to execute. That is, end users must have the CLR installed on their machines in order to execute any managed modules. This situation is similar to the one that end users face with MFC or VB 6 applications:&lt;br /&gt;they must have the MFC or VB DLLs installed in order to run them.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;But as CLR works with assemblies[ a logical grouping of one or more managed modules or resource files] not with Modules. An assembly is the smallest unit of reuse, security, and versioning, produced as single file assembly or multi-file assembly depending on compilers/tools choice.&lt;br /&gt;&lt;br /&gt;The figure below should help explain what assemblies are about:&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLBfwRYi_JHyUwZtnQKUI9Jf3ZQsunillj0_AcNJr13WHH9rJCo441NacZLR2le-gSlCGo-04_rQRBvLIiNmlSPMTBkp0ipuZUhA1L3gNs0EescPyDFyi9i9ZbAiTv_X4ALyEjZjFe6oZR/s1600/ManagedModulesToAssembly.GIF&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 230px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLBfwRYi_JHyUwZtnQKUI9Jf3ZQsunillj0_AcNJr13WHH9rJCo441NacZLR2le-gSlCGo-04_rQRBvLIiNmlSPMTBkp0ipuZUhA1L3gNs0EescPyDFyi9i9ZbAiTv_X4ALyEjZjFe6oZR/s320/ManagedModulesToAssembly.GIF&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5452135847768797586&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A single file [managed modules and resource (or data) files] is passed to tools, producing a single PE file that represents the logical grouping of files. This PE file contains a block of data called the manifest, which is simply another set of metadata tables. These tables describe the assembly: the files that make it up, the publicly exported types implemented by the files in the assembly, and the resource or data files that are associated with it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;file:///C:/DOCUME%7E1/jivan/LOCALS%7E1/Temp/moz-screenshot.png&quot; alt=&quot;&quot; /&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbdotnettips.blogspot.com/feeds/6327226876435735424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/230222142169020147/6327226876435735424' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/6327226876435735424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/6327226876435735424'/><link rel='alternate' type='text/html' href='http://vbdotnettips.blogspot.com/2010/03/managed-modules-windows-portable.html' title='Managed Modules- Windows Portable Executable (PE)'/><author><name>jivangoyal</name><uri>http://www.blogger.com/profile/12853371042810428434</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/AVvXsEiFNnYRwo5q6y98wkF72zrcFKXinQVnA-s48zoRjzCbMXWMON_XNqbKRrKt3TMU7e2x5Kttt4jP4ppNfJkdAItx-P4-VAYwwnIOTCQTooe-0NIIAZaPJK_XSo2nC8wGUfupTzeiavErXxDV/s72-c/ManagedModule+PE.GIF" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-230222142169020147.post-4334518066282280173</id><published>2010-03-23T00:29:00.000-07:00</published><updated>2010-03-23T00:40:38.222-07:00</updated><title type='text'>Date Variable</title><content type='html'>Many times it require to check whether the date in the particular variable is assigned which can be checked by using&lt;br /&gt;&lt;br /&gt;If IsDate(variable of type date) Then .......&lt;br /&gt;&lt;br /&gt;Also, in case to verify that valid value is stored in the database while retrieving, to avoid null exception, it can be checked by using datareader as&lt;br /&gt;&lt;br /&gt;If dr.isdbnull(column index) Then...&lt;br /&gt;Or&lt;br /&gt;If dr(mydate column Name/Index) Is DBNull.Value Then&lt;br /&gt;&lt;br /&gt;Usefull tips:&lt;br /&gt; in VB.net empty date is 1/1/1900&lt;br /&gt;to verify correct date, ensure mydate.year &gt; 1900</content><link rel='replies' type='application/atom+xml' href='http://vbdotnettips.blogspot.com/feeds/4334518066282280173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/230222142169020147/4334518066282280173' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/4334518066282280173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/4334518066282280173'/><link rel='alternate' type='text/html' href='http://vbdotnettips.blogspot.com/2010/03/date-variable.html' title='Date Variable'/><author><name>jivangoyal</name><uri>http://www.blogger.com/profile/12853371042810428434</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-230222142169020147.post-8070767551646066148</id><published>2009-05-18T04:20:00.000-07:00</published><updated>2009-05-18T04:26:41.321-07:00</updated><title type='text'>ListBox Deselect Tip</title><content type='html'>In ListBox, I&#39;ve found that we can not deselect a entry once we selected any one of the entry in the list, even selecting no entry area. But I&#39;ve found one of the solution to fix this issue as :&lt;br /&gt;Let lstBox be the listbox in a form then,&lt;br /&gt;&lt;br /&gt;Private Sub lstBox_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles lstBox.MouseDown&lt;br /&gt;        Try&lt;br /&gt;            If Not lstBox.SelectionMode = SelectionMode.None Then&lt;br /&gt;                lstBox.SelectedIndex = lstBox.IndexFromPoint(e.X, e.Y)&lt;br /&gt;            End If&lt;br /&gt;            If (Windows.Forms.Control.ModifierKeys And Keys.Control) &lt;&gt; 0 Then&lt;br /&gt;                If lstBox.SelectedIndex = lstBox.IndexFromPoint(e.X, e.Y) Then&lt;br /&gt;                    LstbIMBoxList.SelectedIndex = -1&lt;br /&gt;                End If&lt;br /&gt;            End If&lt;br /&gt;&lt;br /&gt;        Catch ex As Exception&lt;br /&gt;            &#39;&lt;br /&gt;        End Try&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;This may fix the issue in many situations depending on the requirements.</content><link rel='replies' type='application/atom+xml' href='http://vbdotnettips.blogspot.com/feeds/8070767551646066148/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/230222142169020147/8070767551646066148' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/8070767551646066148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/8070767551646066148'/><link rel='alternate' type='text/html' href='http://vbdotnettips.blogspot.com/2009/05/listbox-deselect-tip.html' title='ListBox Deselect Tip'/><author><name>jivangoyal</name><uri>http://www.blogger.com/profile/12853371042810428434</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-230222142169020147.post-2824114134246095212</id><published>2009-05-05T01:07:00.000-07:00</published><updated>2009-05-05T01:11:30.259-07:00</updated><title type='text'>Singleton class</title><content type='html'>&lt;pre style=&quot;margin-top: 0pt;&quot; id=&quot;pre0&quot; language=&quot;vbscript&quot;&gt; Public Class MySingletonCls&lt;br /&gt;&lt;br /&gt;           Private Shared objSingle As MySingletonCls&lt;br /&gt;           Private Shared bIsCreated As &lt;span class=&quot;code-SDKkeyword&quot;&gt;Boolean&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;           Private Sub New()&lt;br /&gt;               &lt;span class=&quot;code-string&quot;&gt;&#39;&lt;/span&gt;&lt;span class=&quot;code-string&quot;&gt;Override the default constructor&lt;br /&gt;           End Sub&lt;br /&gt;&lt;br /&gt;           Public Shared Function CreateInstance() As &lt;/span&gt;MySingletonCls&lt;br /&gt;&lt;span class=&quot;code-string&quot;&gt;                If bIsCreated = False Then&lt;br /&gt;                   objSingle = New &lt;/span&gt;MySingletonCls&lt;span class=&quot;code-string&quot;&gt;()&lt;br /&gt;                   bIsCreated = True&lt;br /&gt;                   Return objSingle&lt;br /&gt;               Else&lt;br /&gt;                   Return objSingle&lt;br /&gt;               End If&lt;br /&gt;           End Function&lt;br /&gt; End Class&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbdotnettips.blogspot.com/feeds/2824114134246095212/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/230222142169020147/2824114134246095212' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/2824114134246095212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/2824114134246095212'/><link rel='alternate' type='text/html' href='http://vbdotnettips.blogspot.com/2009/05/singleton-class.html' title='Singleton class'/><author><name>jivangoyal</name><uri>http://www.blogger.com/profile/12853371042810428434</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-230222142169020147.post-4350315554268573699</id><published>2009-05-01T03:00:00.000-07:00</published><updated>2009-05-01T03:03:59.154-07:00</updated><title type='text'>Tip to fetch XML using LINQ</title><content type='html'>&lt;p style=&quot;margin: 0in 0in 0pt; background: rgb(255, 255, 204) none repeat scroll 0% 0%; line-height: normal; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0);&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 8pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;Function FetchXML(ByVal url As Uri) As XElement&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin: 0in 0in 0pt; background: rgb(255, 255, 204) none repeat scroll 0% 0%; line-height: normal; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0);&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 8pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;Dim x = WebRequest.Create(url)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin: 0in 0in 0pt; background: rgb(255, 255, 204) none repeat scroll 0% 0%; line-height: normal; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0);&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 8pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;Using r = x.GetResponse, rs As New StreamReader(r.GetResponseStream)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin: 0in 0in 0pt; background: rgb(255, 255, 204) none repeat scroll 0% 0%; line-height: normal; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0);&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 8pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;            &lt;/span&gt;Return XElement.Parse(rs.ReadToEnd)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;margin: 0in 0in 0pt; background: rgb(255, 255, 204) none repeat scroll 0% 0%; line-height: normal; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0);&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 8pt;&quot;&gt;&lt;span style=&quot;&quot;&gt;        &lt;/span&gt;End Using&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:130%;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 8pt; color: rgb(0, 0, 0);&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;End Function&lt;br /&gt;&lt;br /&gt;Call the function with the location of the xml file to get the corresponding XML element, that can be used for needed purpose.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbdotnettips.blogspot.com/feeds/4350315554268573699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/230222142169020147/4350315554268573699' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/4350315554268573699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/4350315554268573699'/><link rel='alternate' type='text/html' href='http://vbdotnettips.blogspot.com/2009/05/tip-to-fetch-xml-using-linq.html' title='Tip to fetch XML using LINQ'/><author><name>jivangoyal</name><uri>http://www.blogger.com/profile/12853371042810428434</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-230222142169020147.post-8096823930604420629</id><published>2009-05-01T00:02:00.000-07:00</published><updated>2009-05-01T00:21:09.013-07:00</updated><title type='text'>Tip to handle XML based info project</title><content type='html'>Many times we need to manage the projects that just process specific information. Like if we consider a project that handles information about student(name,rno,course,class). So each student will have this information. To very easy way, if we create an XML file with one of the student. Creating a xml with this info is not very tough job.&lt;br /&gt;Upto this point, half is done. Now we just need to get a class which can carry this information for various purposes and which can be written directly to xml file and also can read data from xml file( easiest way is serialize/deserialize  mechanism can be very useful)&lt;br /&gt;&lt;br /&gt;Now to get exact class that can be serialized directly to xml can be easily obtained from xsd utility of Visual Studio. just open the Visual Studio Command Prompt, and get the xsd file for your xml file and then convert this file directly to required class file. So the steps that can be needed to get the class are as below:&lt;br /&gt;&lt;br /&gt;1. Create xml file say &#39;MyXml.xml&#39;&lt;br /&gt;2. run xsd MyXml.xml, will result MyXml.xsd&lt;br /&gt;3. run xsd MyXml.xsd /c /l:vb, will result MyXml.vb&lt;br /&gt;&lt;br /&gt;[the class can be constructed in various ways by using xsd, for details refer xsd documentation.]&lt;br /&gt;&lt;br /&gt;note, in step 2 and 3, if current directory for running the command is same that is containing the MyXml.xml file then use command as such, else specify the full path of the file(s). Also target for the resulting file also can be specified(refer xsd documentation).&lt;br /&gt;&lt;br /&gt;now we are with a class for which an object can be easily serialized/deserialized. So create collection of objects to carry all the records, applly any type of manipulations and serialize with XMLSerializer to write it to xml directly without worring about most of the validations as most are handled by serializers.</content><link rel='replies' type='application/atom+xml' href='http://vbdotnettips.blogspot.com/feeds/8096823930604420629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/230222142169020147/8096823930604420629' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/8096823930604420629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/8096823930604420629'/><link rel='alternate' type='text/html' href='http://vbdotnettips.blogspot.com/2009/05/tip-to-handle-xml-based-info-project.html' title='Tip to handle XML based info project'/><author><name>jivangoyal</name><uri>http://www.blogger.com/profile/12853371042810428434</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-230222142169020147.post-6945809068540387105</id><published>2009-04-30T01:01:00.000-07:00</published><updated>2009-04-30T23:47:52.487-07:00</updated><title type='text'>Protecting Assembly/DLL from illegal access tips</title><content type='html'>Sometimes we want to protect the access to the various functions of  our assembly, I have identified that if the functions of the assembly made as friend and assembly is also made friend assembly, then the results will be as desired. As&lt;br /&gt;&lt;br /&gt;A &lt;span class=&quot;parameter&quot;&gt;friend assembly&lt;/span&gt; is an assembly that is permitted to access another assembly&#39;s &lt;span&gt;&lt;span class=&quot;input&quot;&gt;Friend&lt;/span&gt;&lt;/span&gt; types and members.&lt;br /&gt;&lt;br /&gt;So Its possible to protect illegal access to our secure functionality.&lt;br /&gt;&lt;br /&gt;This is one of the solution that can be helpful in some situation.&lt;br /&gt;&lt;br /&gt;The info of Friend Assemblies can found at the &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb384772.aspx&quot;&gt;link &lt;/a&gt;http://msdn.microsoft.com/en-us/library/bb384772.aspx</content><link rel='replies' type='application/atom+xml' href='http://vbdotnettips.blogspot.com/feeds/6945809068540387105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/230222142169020147/6945809068540387105' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/6945809068540387105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/6945809068540387105'/><link rel='alternate' type='text/html' href='http://vbdotnettips.blogspot.com/2009/04/protecting-assemblydll-from-illegal.html' title='Protecting Assembly/DLL from illegal access tips'/><author><name>jivangoyal</name><uri>http://www.blogger.com/profile/12853371042810428434</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-230222142169020147.post-4204275060323000891</id><published>2009-04-29T03:09:00.000-07:00</published><updated>2009-04-29T03:31:09.382-07:00</updated><title type='text'>Some Simple LINQ Examples for existing examples</title><content type='html'>Here are some simple examples to understand better to LINQ&lt;br /&gt;&lt;br /&gt;&lt;span id=&quot;intelliTXT&quot;&gt;&lt;pre class=&quot;codesnippet&quot;&gt;&lt;span id=&quot;intelliTXT&quot;&gt;creating an iterator that will give you the letters &quot;a&quot; to &quot;z&quot; as you enumerate it&lt;/span&gt;:&lt;br /&gt;Dim letters(0 To 25) As Char&lt;br /&gt;For i As Int32 = 0 To 25&lt;br /&gt;  letters(i) = ChrW(&amp;amp;H61 + i)&lt;br /&gt;Next&lt;br /&gt;&lt;br /&gt;By Using LINQ&lt;br /&gt;&lt;span id=&quot;intelliTXT&quot;&gt;&lt;pre class=&quot;codesnippet&quot;&gt;Dim letters = From i In Enumerable.Range(0, 26) _&lt;br /&gt;  Select ChrW(&amp;amp;H61 + i)&lt;/pre&gt;&lt;/span&gt;&lt;br /&gt;&lt;span id=&quot;intelliTXT&quot;&gt;To read from a stream line-by-line,&lt;br /&gt;search for a substring, and return the first couple of matches.&lt;/span&gt;&lt;br /&gt;&lt;span id=&quot;intelliTXT&quot;&gt;&lt;pre class=&quot;codesnippet&quot;&gt;strLine = myStreamReader.ReadLine&lt;br /&gt;Do While strLine IsNot Nothing&lt;br /&gt;  If strLine.Contains(value) Then&lt;br /&gt;     count += 1&lt;br /&gt;     resultList.Add(strLine)&lt;br /&gt;     If count &gt;= 3 Then Exit Do&lt;br /&gt;  End If&lt;br /&gt;  strLine = myStreamReader.ReadLine&lt;br /&gt;Loop&lt;br /&gt;&lt;br /&gt;&lt;span id=&quot;intelliTXT&quot;&gt;Unfortunately, StreamReader doesn&#39;t have an&lt;br /&gt;iterator that returns each line. Without something that is enumerable,&lt;br /&gt;you can&#39;t form the basis of a LINQ query, so you&#39;re forced to write&lt;br /&gt;your query imperatively. That&#39;s not as bad as it might first sound;&lt;/span&gt;&lt;br /&gt;&lt;span id=&quot;intelliTXT&quot;&gt;Building the query into the imperative procedural block does work,&lt;br /&gt;although it&#39;s kind of on the ugly side.&lt;/span&gt;&lt;br /&gt;&lt;span id=&quot;intelliTXT&quot;&gt;If you have an extension method named Lines that&lt;br /&gt;returns an IEnumerable with each item a line, then you can create a&lt;br /&gt;query like this:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span id=&quot;intelliTXT&quot;&gt;&lt;pre class=&quot;codesnippet&quot;&gt;Dim result = From line In myStreamReader.Lines _&lt;br /&gt;   Where line.Contains(value) _&lt;br /&gt;   Take 3&lt;/pre&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbdotnettips.blogspot.com/feeds/4204275060323000891/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/230222142169020147/4204275060323000891' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/4204275060323000891'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/4204275060323000891'/><link rel='alternate' type='text/html' href='http://vbdotnettips.blogspot.com/2009/04/some-simple-linq-examples-for-existing.html' title='Some Simple LINQ Examples for existing examples'/><author><name>jivangoyal</name><uri>http://www.blogger.com/profile/12853371042810428434</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-230222142169020147.post-4587452986775896666</id><published>2009-04-28T01:14:00.000-07:00</published><updated>2009-04-28T01:25:21.096-07:00</updated><title type='text'>Tip for Alphablended area of image in list view</title><content type='html'>In List View, while displaying the images for the various files/folders, sometimes we face the problem that the alpha blended area of the image is not displayed properly with the default configuration of the list view. So to show the image with the correct display, I&#39;ve found that if we set the ColorDepth of the image list (to be used to store the images to be shown in list view) to appropriate values, it provides the results as desired. So if smallImgLst and largeImgLst are the two image lists used for list view then if we need two views of the list i.e. Small images(16x16) and Large imges(32x32) then we can set the values as below:&lt;br /&gt;&lt;br /&gt;smallImgLst.ColorDepth=ColorDepth.Depth32Bit&lt;br /&gt;largeImgLst.ColorDepth=ColorDepth.Depth32Bit&lt;br /&gt;&lt;br /&gt;smallImgLst.ImageSize=New System.Drawing.Size(16,16)&lt;br /&gt;largeImgLst.ImageSize=New System.Drawing.Size(32,32)&lt;br /&gt;&lt;br /&gt;If there are some other tips to resolve such kind of issue then comments are invited for discussion.</content><link rel='replies' type='application/atom+xml' href='http://vbdotnettips.blogspot.com/feeds/4587452986775896666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/230222142169020147/4587452986775896666' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/4587452986775896666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/4587452986775896666'/><link rel='alternate' type='text/html' href='http://vbdotnettips.blogspot.com/2009/04/in-list-view-while-displaying-images.html' title='Tip for Alphablended area of image in list view'/><author><name>jivangoyal</name><uri>http://www.blogger.com/profile/12853371042810428434</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-230222142169020147.post-4572291943849655176</id><published>2009-04-24T04:44:00.000-07:00</published><updated>2009-04-24T04:59:54.514-07:00</updated><title type='text'>Display Image in ComboBox</title><content type='html'>In case we need to display a list of images in ComboBox we can do it by caring just few things about combobox. Firtsly set the &#39;DrawMode&#39; of the ComboBox to &#39;OwnerDrawFixed&#39; if all the images are of same size or set &#39;OwnerDrawVariable&#39; if images are of variable size. and also for the variable sized images set the width and height during the &#39;MeasureItem&#39; event of the combobox. If imgList1 contains all the needed images of variable  and let number of items in the combobox is equal to number of images in the imagelist and each index of image specifies the corresponding item in combo box, Then I guess the following will be fine to get the list of images in the combobox.&lt;br /&gt;&lt;br /&gt;1. Set the property &#39;DrawMode&#39; to OwnerDrawVariable&lt;br /&gt;2. In the method that implement event &#39;DrawItem&#39; of the combo box, for the case if index of current item is non empty then then draw the image. i.e.&lt;br /&gt;&lt;br /&gt;         If e.Index&lt;&gt;-1 Then&lt;br /&gt;                 e.Graphics.DrawImage(imgList1.images(e.Index),e.Bounds.Left,e.Bounds.Top)&lt;br /&gt;         End If&lt;br /&gt;&lt;br /&gt;3. In the method that implements the &#39;MeasureItem&#39; event of the combo box the following can be used&lt;br /&gt;           e.ItemHeight =imgList1.ImgaeSize.Height&lt;br /&gt;           e.ItemWidth = imgList1.ImageSize.Width&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;These are the basic settings that are needed to display images in combo box, rest are depends on the requirements.&lt;br /&gt;&lt;br /&gt;Drop the lines if you think that can be help better for similar kind of requirements.</content><link rel='replies' type='application/atom+xml' href='http://vbdotnettips.blogspot.com/feeds/4572291943849655176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/230222142169020147/4572291943849655176' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/4572291943849655176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/4572291943849655176'/><link rel='alternate' type='text/html' href='http://vbdotnettips.blogspot.com/2009/04/display-image-in-combobox.html' title='Display Image in ComboBox'/><author><name>jivangoyal</name><uri>http://www.blogger.com/profile/12853371042810428434</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-230222142169020147.post-5219200699815708730</id><published>2009-04-24T03:10:00.000-07:00</published><updated>2009-04-24T03:49:17.878-07:00</updated><title type='text'>Count Character Occurances In a String</title><content type='html'>In a string occurance of particular character can be found easily by using the function &#39;InStr()&#39; which returns the location of the character in the string. But if we want to count the number of occurances of particular character in the string then I&#39;ve found the following three ways to get the&lt;br /&gt;&lt;br /&gt;Private Function countOccurance1(ByVal hayStack As String,ByVal needle As Char) As Integer&lt;br /&gt;      &lt;blockquote&gt;If String.IsNullOrEmpty(hayStack) Then Return 0&lt;br /&gt;      Dim chars() As Char = hayStack.ToCharArray&lt;br /&gt;      Dim count As Integer = 0&lt;br /&gt;      For Each ch As Char In chars&lt;br /&gt;                If ch = needle Then count += 1&lt;br /&gt;      Next&lt;br /&gt;      Return count&lt;/blockquote&gt;&lt;br /&gt;  End Function&lt;br /&gt;&lt;br /&gt;  Private Function countOccurance2(ByVal hayStack As String, ByVal needle As String) As Integer&lt;br /&gt;      &lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;       Return (Len(hayStack) - Len(Replace(hayStack, needle, &quot;&quot;))) / Len(needle)&lt;br /&gt;  End Function&lt;br /&gt;&lt;br /&gt;  Private Function countOccurance3(ByVal hayStack As String, ByVal needle As String) As Integer&lt;br /&gt;      &lt;blockquote&gt;Dim i As Long, sHayStack As String : sHayStack = hayStack&lt;br /&gt;      Do Until InStr(sHayStack, needle) = 0&lt;br /&gt;          sHayStack = Replace(sHayStack, needle, &quot;&quot;, 1, 1) : i += 1&lt;br /&gt;      Loop&lt;br /&gt;      Return i&lt;/blockquote&gt;&lt;br /&gt;  End Function&lt;br /&gt;&lt;br /&gt;I&#39;ve not tested which is more effiecient, but all provides the similar results for many number tests.</content><link rel='replies' type='application/atom+xml' href='http://vbdotnettips.blogspot.com/feeds/5219200699815708730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/230222142169020147/5219200699815708730' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/5219200699815708730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/5219200699815708730'/><link rel='alternate' type='text/html' href='http://vbdotnettips.blogspot.com/2009/04/count-character-occurances-in-string.html' title='Count Character Occurances In a String'/><author><name>jivangoyal</name><uri>http://www.blogger.com/profile/12853371042810428434</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-230222142169020147.post-6699586016794324253</id><published>2009-04-22T22:16:00.000-07:00</published><updated>2009-04-22T23:48:24.550-07:00</updated><title type='text'>Open XML Format SDK 2.0</title><content type='html'>&lt;meta equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;&lt;meta name=&quot;ProgId&quot; content=&quot;Word.Document&quot;&gt;&lt;meta name=&quot;Generator&quot; content=&quot;Microsoft Word 12&quot;&gt;&lt;meta name=&quot;Originator&quot; content=&quot;Microsoft Word 12&quot;&gt;&lt;link rel=&quot;File-List&quot; href=&quot;file:///C:%5CDOCUME%7E1%5Cjivan%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml&quot;&gt;&lt;link rel=&quot;themeData&quot; href=&quot;file:///C:%5CDOCUME%7E1%5Cjivan%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx&quot;&gt;&lt;link rel=&quot;colorSchemeMapping&quot; href=&quot;file:///C:%5CDOCUME%7E1%5Cjivan%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml&quot;&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:trackmoves/&gt;   &lt;w:trackformatting/&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:donotpromoteqf/&gt;   &lt;w:lidthemeother&gt;EN-US&lt;/w:LidThemeOther&gt;   &lt;w:lidthemeasian&gt;X-NONE&lt;/w:LidThemeAsian&gt;   &lt;w:lidthemecomplexscript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;    &lt;w:splitpgbreakandparamark/&gt;    &lt;w:dontvertaligncellwithsp/&gt;    &lt;w:dontbreakconstrainedforcedtables/&gt;    &lt;w:dontvertalignintxbx/&gt;    &lt;w:word11kerningpairs/&gt;    &lt;w:cachedcolbalance/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;   &lt;m:mathpr&gt;    &lt;m:mathfont val=&quot;Cambria Math&quot;&gt;    &lt;m:brkbin val=&quot;before&quot;&gt;    &lt;m:brkbinsub val=&quot;--&quot;&gt;    &lt;m:smallfrac val=&quot;off&quot;&gt;    &lt;m:dispdef/&gt;    &lt;m:lmargin val=&quot;0&quot;&gt;    &lt;m:rmargin val=&quot;0&quot;&gt;    &lt;m:defjc val=&quot;centerGroup&quot;&gt;    &lt;m:wrapindent val=&quot;1440&quot;&gt;    &lt;m:intlim val=&quot;subSup&quot;&gt;    &lt;m:narylim val=&quot;undOvr&quot;&gt;   &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate=&quot;false&quot; defunhidewhenused=&quot;true&quot; defsemihidden=&quot;true&quot; defqformat=&quot;false&quot; defpriority=&quot;99&quot; latentstylecount=&quot;267&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;0&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; qformat=&quot;true&quot; name=&quot;Normal&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;9&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; qformat=&quot;true&quot; name=&quot;heading 1&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;9&quot; qformat=&quot;true&quot; name=&quot;heading 2&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;9&quot; qformat=&quot;true&quot; name=&quot;heading 3&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;9&quot; qformat=&quot;true&quot; name=&quot;heading 4&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;9&quot; qformat=&quot;true&quot; name=&quot;heading 5&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;9&quot; qformat=&quot;true&quot; name=&quot;heading 6&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;9&quot; qformat=&quot;true&quot; name=&quot;heading 7&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;9&quot; qformat=&quot;true&quot; name=&quot;heading 8&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;9&quot; qformat=&quot;true&quot; name=&quot;heading 9&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;39&quot; name=&quot;toc 1&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;39&quot; name=&quot;toc 2&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;39&quot; name=&quot;toc 3&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;39&quot; name=&quot;toc 4&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;39&quot; name=&quot;toc 5&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;39&quot; name=&quot;toc 6&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;39&quot; name=&quot;toc 7&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;39&quot; name=&quot;toc 8&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;39&quot; name=&quot;toc 9&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;35&quot; qformat=&quot;true&quot; name=&quot;caption&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;10&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; qformat=&quot;true&quot; name=&quot;Title&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;1&quot; name=&quot;Default Paragraph Font&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;11&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; qformat=&quot;true&quot; name=&quot;Subtitle&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;22&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; qformat=&quot;true&quot; name=&quot;Strong&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;20&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; qformat=&quot;true&quot; name=&quot;Emphasis&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;59&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Table Grid&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Placeholder Text&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;1&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; qformat=&quot;true&quot; name=&quot;No Spacing&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;60&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Light Shading&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;61&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Light List&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;62&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Light Grid&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;63&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Shading 1&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;64&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Shading 2&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;65&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium List 1&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;66&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium List 2&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;67&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Grid 1&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;68&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Grid 2&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;69&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Grid 3&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;70&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Dark List&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;71&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Colorful Shading&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;72&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Colorful List&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;73&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Colorful Grid&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;60&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Light Shading Accent 1&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;61&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Light List Accent 1&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;62&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Light Grid Accent 1&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;63&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Shading 1 Accent 1&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;64&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Shading 2 Accent 1&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;65&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium List 1 Accent 1&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Revision&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;34&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; qformat=&quot;true&quot; name=&quot;List Paragraph&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;29&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; qformat=&quot;true&quot; name=&quot;Quote&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;30&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; qformat=&quot;true&quot; name=&quot;Intense Quote&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;66&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium List 2 Accent 1&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;67&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Grid 1 Accent 1&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;68&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Grid 2 Accent 1&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;69&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Grid 3 Accent 1&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;70&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Dark List Accent 1&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;71&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Colorful Shading Accent 1&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;72&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Colorful List Accent 1&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;73&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Colorful Grid Accent 1&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;60&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Light Shading Accent 2&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;61&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Light List Accent 2&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;62&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Light Grid Accent 2&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;63&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Shading 1 Accent 2&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;64&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Shading 2 Accent 2&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;65&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium List 1 Accent 2&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;66&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium List 2 Accent 2&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;67&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Grid 1 Accent 2&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;68&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Grid 2 Accent 2&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;69&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Grid 3 Accent 2&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;70&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Dark List Accent 2&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;71&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Colorful Shading Accent 2&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;72&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Colorful List Accent 2&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;73&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Colorful Grid Accent 2&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;60&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Light Shading Accent 3&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;61&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Light List Accent 3&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;62&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Light Grid Accent 3&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;63&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Shading 1 Accent 3&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;64&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Shading 2 Accent 3&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;65&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium List 1 Accent 3&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;66&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium List 2 Accent 3&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;67&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Grid 1 Accent 3&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;68&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Grid 2 Accent 3&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;69&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Grid 3 Accent 3&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;70&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Dark List Accent 3&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;71&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Colorful Shading Accent 3&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;72&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Colorful List Accent 3&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;73&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Colorful Grid Accent 3&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;60&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Light Shading Accent 4&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;61&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Light List Accent 4&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;62&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Light Grid Accent 4&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;63&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Shading 1 Accent 4&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;64&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Shading 2 Accent 4&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;65&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium List 1 Accent 4&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;66&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium List 2 Accent 4&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;67&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Grid 1 Accent 4&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;68&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Grid 2 Accent 4&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;69&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Grid 3 Accent 4&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;70&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Dark List Accent 4&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;71&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Colorful Shading Accent 4&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;72&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Colorful List Accent 4&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;73&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Colorful Grid Accent 4&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;60&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Light Shading Accent 5&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;61&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Light List Accent 5&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;62&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Light Grid Accent 5&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;63&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Shading 1 Accent 5&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;64&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Shading 2 Accent 5&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;65&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium List 1 Accent 5&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;66&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium List 2 Accent 5&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;67&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Grid 1 Accent 5&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;68&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Grid 2 Accent 5&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;69&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Grid 3 Accent 5&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;70&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Dark List Accent 5&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;71&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Colorful Shading Accent 5&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;72&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Colorful List Accent 5&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;73&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Colorful Grid Accent 5&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;60&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Light Shading Accent 6&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;61&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Light List Accent 6&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;62&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Light Grid Accent 6&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;63&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Shading 1 Accent 6&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;64&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Shading 2 Accent 6&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;65&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium List 1 Accent 6&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;66&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium List 2 Accent 6&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;67&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Grid 1 Accent 6&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;68&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Grid 2 Accent 6&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;69&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Medium Grid 3 Accent 6&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;70&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Dark List Accent 6&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;71&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Colorful Shading Accent 6&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;72&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Colorful List Accent 6&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;73&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; name=&quot;Colorful Grid Accent 6&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;19&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; qformat=&quot;true&quot; name=&quot;Subtle Emphasis&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;21&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; qformat=&quot;true&quot; name=&quot;Intense Emphasis&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;31&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; qformat=&quot;true&quot; name=&quot;Subtle Reference&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;32&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; qformat=&quot;true&quot; name=&quot;Intense Reference&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;33&quot; semihidden=&quot;false&quot; unhidewhenused=&quot;false&quot; qformat=&quot;true&quot; name=&quot;Book Title&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;37&quot; name=&quot;Bibliography&quot;&gt;   &lt;w:lsdexception locked=&quot;false&quot; priority=&quot;39&quot; qformat=&quot;true&quot; name=&quot;TOC Heading&quot;&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Wingdings; 	panose-1:5 0 0 0 0 0 0 0 0 0; 	mso-font-charset:2; 	mso-generic-font-family:auto; 	mso-font-pitch:variable; 	mso-font-signature:0 268435456 0 0 -2147483648 0;} @font-face 	{font-family:&quot;Cambria Math&quot;; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1073750139 0 0 159 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:&quot;&quot;; 	margin-top:0in; 	margin-right:0in; 	margin-bottom:10.0pt; 	margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:&quot;Times New Roman&quot;; 	mso-bidi-theme-font:minor-bidi;} a:link, span.MsoHyperlink 	{mso-style-priority:99; 	color:blue; 	text-decoration:underline; 	text-underline:single;} a:visited, span.MsoHyperlinkFollowed 	{mso-style-noshow:yes; 	mso-style-priority:99; 	color:purple; 	mso-themecolor:followedhyperlink; 	text-decoration:underline; 	text-underline:single;} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:&quot;Times New Roman&quot;; 	mso-bidi-theme-font:minor-bidi;} .MsoPapDefault 	{mso-style-type:export-only; 	margin-bottom:10.0pt; 	line-height:115%;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.0in 1.0in 1.0in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;}  /* List Definitions */  @list l0 	{mso-list-id:696548022; 	mso-list-template-ids:1631372666;} @list l0:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:Symbol;} @list l1 	{mso-list-id:972563556; 	mso-list-template-ids:-2123353314;} @list l1:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	mso-ansi-font-size:10.0pt; 	font-family:Symbol;} ol 	{margin-bottom:0in;} ul 	{margin-bottom:0in;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:&quot;Table Normal&quot;; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:&quot;&quot;; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin-top:0in; 	mso-para-margin-right:0in; 	mso-para-margin-bottom:10.0pt; 	mso-para-margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin;} &lt;/style&gt; &lt;![endif]--&gt;&lt;b&gt;&lt;span style=&quot;font-size: 18pt; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;Open XML documents provides strongly typed part and content classes for use &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;Open XML is an open ECMA 376 standard and is also approved as the ISO/IEC 29500 standard that defines a set of XML schemas for representing spreadsheets, charts, presentations, and word processing documents. Microsoft Office Word 2007, Excel 2007, and PowerPoint 2007 all use Open XML as the default file format.&lt;br /&gt;&lt;br /&gt;The Open XML file formats are useful for developers because they use an open standard and are based on well-known technologies: ZIP and XML.&lt;br /&gt;&lt;br /&gt;The Open XML Format SDK 2.0 is built on top of the &lt;b&gt;System.IO.Packaging&lt;/b&gt; API and provides strongly typed part classes to manipulate Open XML documents. The SDK also uses the .NET Framework Language-Integrated Query (LINQ) technology to provide strongly typed object access to the XML content inside the parts of Open XML documents.&lt;/p&gt;  &lt;ul type=&quot;disc&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;b&gt;Requirements:&lt;/b&gt;&lt;br /&gt;    &lt;br /&gt;     &lt;b&gt;&lt;span style=&quot;font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;Supported Operating Systems: &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;Windows Server 2003; Windows Vista; Windows XP Service      Pack 2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;This download requires the following: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul type=&quot;disc&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;The Microsoft .NET Framework version 3.5. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;Up to 120 MB of available disk space. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;“Be aware that it’s a 90MB download (about 120MB installed). About 100MB of it is documentation. The library itself (DocumentFormat.OpenXml.dll) is 3.5MB” as specified in &lt;a href=&quot;http://windowsclientdevelopment.spaces.live.com/blog/cns%212B93591C07ACD3DE%21158.entry&quot;&gt;windowsclientdevelopment&lt;/a&gt;.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;The Open XML Format SDK 2.0 went live on April 7, 2009, and is now up for grabs via the Microsoft Download Center. The SDK, and the underlying System.IO.Packaging API enables developers to leverage a simplified manipulation process involving OpenXML packages. And when it comes down to manipulation of OpenXML packages, version 2.0 of the SDK &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;brings to the table support for strongly typed part and content classes.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;“In version 1 of the Open XML SDK we released the Open XML Packaging API, which allows you to create, open and manipulate Open XML files at the package and part level. In the first CTP of version 2 we released the Open XML Low Level DOM and Stream Reading/Writing components, which allow you to create and manipulate objects within xml parts contained in an Open XML package. In the second CTP of version 2 we are providing schema level validation functionality,” revealed &lt;strong&gt;&lt;span style=&quot;font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;a href=&quot;http://blogs.msdn.com/brian_jones/archive/2009/04/08/announcing-the-release-of-the-open-xml-sdk-version-2-april-2009-ctp.aspx&quot; target=&quot;_blank&quot;&gt;Brian Jones&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;, Office program manager.&lt;/p&gt;    &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;In addition, the April 2009 CTP of Open XML Format SDK 2.0 permits OpenXML documents to be validated. The validation functionality added to the latest version of the SDK is designed to permit developers to perform validation of Open XML docs in relation to variations of the Open XML Format. Essentially what validation support is designed to do is to help reduce the possibility of invalid or corrupt Open XML files.&lt;br /&gt;&lt;br /&gt;“Manipulating Open XML Formats by using the Open XML Base layer makes it much easier for you to work on the Open XML files, but doing so does not guarantee the production of valid Open XML files. The new Schema Level Validation component provides a mechanism to help you discover Open XML errors within files and in your code. This component assists you in debugging and validating Open XML files based on the schemas,” Jones added.&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;This release includes a high-level DOM (document object model) for Open XML development, as well as several tools to streamline Open XML development:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;* The OpenXmlDiff utility identifies differences in the markup in two Open XML documents.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;* The Open XML Class Explorer helps you determine which strongly typed class to use for a specific task, and includes the text of the relevant section of the ECMA-376 spec for each class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;&lt;span style=&quot;&quot;&gt;    &lt;/span&gt;* The Open XML Document Reflector takes a target document as input, and with a few clicks it shows you the C# code needed to generate that document (or a section of it) with the Open XML SDK.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;Sample code that supports the scenarios described in the series of articles titled Creating Documents by Using the Open XML Format SDK 2.0 (Community Technology Preview)&lt;br /&gt;&lt;br /&gt;The first article is located at:&lt;br /&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/dd440953.aspx&quot;&gt;http://msdn.microsoft.com/en-us/library/dd440953.aspx&lt;/a&gt; &lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;Some brief overview can be seen from the &lt;a href=&quot;http://www.dnrtv.com/default.aspx?showNum=137&quot;&gt;link &lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt; line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://vbdotnettips.blogspot.com/feeds/6699586016794324253/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/230222142169020147/6699586016794324253' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/6699586016794324253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/6699586016794324253'/><link rel='alternate' type='text/html' href='http://vbdotnettips.blogspot.com/2009/04/open-xml-format-sdk-20.html' title='Open XML Format SDK 2.0'/><author><name>jivangoyal</name><uri>http://www.blogger.com/profile/12853371042810428434</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-230222142169020147.post-7678166295137306864</id><published>2009-04-16T03:43:00.000-07:00</published><updated>2009-04-16T04:22:22.474-07:00</updated><title type='text'>Filling the DataGridView with all the files(upto deepest level) in specified directory</title><content type='html'>In case we need to fill a DataGridView in our form with all the files in the specified directory, no matter how deep many files exists, all the files are retireved from the directory and the related information is displayed in the DataGridView.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The steps to get the result as below:&lt;/div&gt;&lt;div&gt;1. Get the collection of FileInfo for each file in the directory/drive by using function explained in &lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:medium;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(204, 102, 0);  line-height: 25px; &quot;&gt;&lt;a href=&quot;http://vbdotnettips.blogspot.com/2009/04/retrieve-all-files-in-specified-folder_16.html&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:medium;&quot;&gt;Retrieve All Files Info in the specified Folder (Using LINQ To Object)&lt;/span&gt;&lt;/a&gt;&lt;a href=&quot;http://vbdotnettips.blogspot.com/2009/04/retrieve-all-files-in-specified-folder_16.html&quot; style=&quot;text-decoration: none; font-weight: normal; color: rgb(51, 51, 51); display: inline !important; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:medium;&quot;&gt;&quot; blog&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;2. Add the DataGridView component in the form name it anything say DataGridView1&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3. Add the following string in the action corresponding to which data grid is needed to be filled with the file information:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;       Dim arrList as New ArrayList&lt;/div&gt;&lt;div&gt;       getCompleteFileList1(directoryName, arrList)&lt;br /&gt;&lt;/div&gt;&lt;div&gt;       dataGridView1.DataSource= arrList&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Or If only specific list of attributes for each file is needed to be displayed the the following lines can be considered:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;       Dim arrList As New ArrayList&lt;/div&gt;&lt;div&gt;       getCompleteFileList1(directoryName, arrList)&lt;/div&gt;&lt;div&gt;        Dim filesInfo = From file As IO.FileInfo In arrList _&lt;/div&gt;&lt;div&gt;                       Select file.Name, file.DirectoryName, file.Length, file.LastWriteTime&lt;/div&gt;&lt;div&gt;        dataGridView1.DataSource = filesInfo.ToList&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbdotnettips.blogspot.com/feeds/7678166295137306864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/230222142169020147/7678166295137306864' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/7678166295137306864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/7678166295137306864'/><link rel='alternate' type='text/html' href='http://vbdotnettips.blogspot.com/2009/04/filling-datagridview-with-all-filesupto.html' title='Filling the DataGridView with all the files(upto deepest level) in specified directory'/><author><name>jivangoyal</name><uri>http://www.blogger.com/profile/12853371042810428434</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-230222142169020147.post-2958073822404321021</id><published>2009-04-16T03:34:00.000-07:00</published><updated>2009-04-16T04:16:10.171-07:00</updated><title type='text'>Retrieve All Files Info in the specified Folder (Using LINQ To Object)</title><content type='html'>&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;        Public Sub getCompleteFileList1(ByVal rootDir As String, ByRef arrFileList As ArrayList) &lt;/div&gt;&lt;div&gt;            If My.Computer.FileSystem.GetDirectoryInfo(rootDir).Name = &quot;System Volume Information&quot; Then&lt;/div&gt;&lt;div&gt;                Return&lt;/div&gt;&lt;div&gt;            End If&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;            For Each recursiveDir As String In My.Computer.FileSystem.GetDirectories(rootDir)&lt;/div&gt;&lt;div&gt;                Call getCompleteFileList1(recursiveDir, arrFileList)&lt;/div&gt;&lt;div&gt;            Next&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;            Dim files = From file In My.Computer.FileSystem.GetFiles(rootDir, FileIO.SearchOption.SearchTopLevelOnly) _&lt;/div&gt;&lt;div&gt;                        Order By file _&lt;/div&gt;&lt;div&gt;                        Select My.Computer.FileSystem.GetFileInfo(file)&lt;/div&gt;&lt;div&gt;            arrFileList.AddRange(files.ToList)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;        End Sub&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This function return a collection of System.IO.FileInfo objects that can be used to retrieve all files and their corresponding information with same list that can be used depending on the requirement.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If  only the specific attribute is desired for each file, then we can specify the needed attribute under the Select Key&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbdotnettips.blogspot.com/feeds/2958073822404321021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/230222142169020147/2958073822404321021' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/2958073822404321021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/2958073822404321021'/><link rel='alternate' type='text/html' href='http://vbdotnettips.blogspot.com/2009/04/retrieve-all-files-in-specified-folder_16.html' title='Retrieve All Files Info in the specified Folder (Using LINQ To Object)'/><author><name>jivangoyal</name><uri>http://www.blogger.com/profile/12853371042810428434</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><entry><id>tag:blogger.com,1999:blog-230222142169020147.post-766912944844483166</id><published>2009-04-16T00:00:00.000-07:00</published><updated>2009-05-07T00:14:01.809-07:00</updated><title type='text'>Retrieve All Files in the specified Folder</title><content type='html'>&lt;div&gt;&lt;div&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;    Private Sub getCompleteFileList(ByVal rootDir As String, ByRef arrFileList As ArrayList)&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;If My.Computer.FileSystem.GetDirectoryInfo(rootDir).Name = &quot;System Volume Information&quot; Then&lt;/div&gt;&lt;div&gt;            Return&lt;/div&gt;&lt;div&gt;End If&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;div&gt;For Each recursiveDir As String In My.Computer.FileSystem.GetDirectories(rootDir)&lt;/div&gt;&lt;div&gt;            Call getCompleteFileList(recursiveDir, arrFileList)&lt;/div&gt;&lt;div&gt;Next&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;&lt;div&gt;        For Each foundFile As String In My.Computer.FileSystem.GetFiles(rootDir,FileIO.SearchOption_&lt;br /&gt;                                                               .SearchTopLevelOnly)&lt;/div&gt;&lt;div&gt;        &lt;/div&gt;&lt;div&gt;            arrFileList.Add(foundFile)&lt;/div&gt;&lt;div&gt;        Next&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;    End Sub&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;rootDir can be root drive or some specific directory. arrFileList is the final list of files in rootDir&#39; all subDir,Sub-SubDir,Sub-Sub-SubDir................ means all the existing files, no matter how much deeper, are added in th earrFileList that can be used for any needed purpose requiring all the list of files in some dir.&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbdotnettips.blogspot.com/feeds/766912944844483166/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/230222142169020147/766912944844483166' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/766912944844483166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/766912944844483166'/><link rel='alternate' type='text/html' href='http://vbdotnettips.blogspot.com/2009/04/retrieve-all-files-in-specified-folder.html' title='Retrieve All Files in the specified Folder'/><author><name>jivangoyal</name><uri>http://www.blogger.com/profile/12853371042810428434</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-230222142169020147.post-3303946413674600991</id><published>2009-04-14T03:34:00.000-07:00</published><updated>2009-04-14T23:47:10.130-07:00</updated><title type='text'>XML Operations: Create XML, Insert Data, Modify Data and Delete Data in XML File</title><content type='html'>&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; &quot;&gt;&lt;div style=&quot;border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; width: auto; font: normal normal normal 100%/normal Georgia, serif; text-align: left; &quot;&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:large;&quot;&gt;Create XML File&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;div&gt;Private Sub CreateXmlFile()&lt;/div&gt;&lt;div&gt;        Dim xw As New XmlTextWriter(&quot;C:\mySampleXml.xml&quot;, System.Text.Encoding.UTF8)&lt;/div&gt;&lt;div&gt;        xw.WriteStartDocument()&lt;/div&gt;&lt;div&gt;        xw.WriteStartElement(&quot;nodes&quot;, &quot;&quot;)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;        xw.WriteStartElement(&quot;node&quot;, &quot;&quot;)&lt;/div&gt;&lt;div&gt;        xw.WriteStartAttribute(&quot;id&quot;, &quot;&quot;)&lt;/div&gt;&lt;div&gt;        xw.WriteString(&quot;1&quot;)&lt;/div&gt;&lt;div&gt;        xw.WriteEndAttribute()&lt;/div&gt;&lt;div&gt;        xw.WriteStartElement(&quot;child&quot;)&lt;/div&gt;&lt;div&gt;        xw.WriteString(&quot;sample10&quot;)&lt;/div&gt;&lt;div&gt;        xw.WriteEndElement()&lt;/div&gt;&lt;div&gt;        xw.WriteStartElement(&quot;child&quot;)&lt;/div&gt;&lt;div&gt;        xw.WriteString(&quot;sample11&quot;)&lt;/div&gt;&lt;div&gt;        xw.WriteEndElement()&lt;/div&gt;&lt;div&gt;        xw.WriteEndElement()&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;        xw.WriteStartElement(&quot;node&quot;, &quot;&quot;)&lt;/div&gt;&lt;div&gt;        xw.WriteStartAttribute(&quot;id&quot;, &quot;&quot;)&lt;/div&gt;&lt;div&gt;        xw.WriteString(&quot;2&quot;)&lt;/div&gt;&lt;div&gt;        xw.WriteEndAttribute()&lt;/div&gt;&lt;div&gt;        xw.WriteStartElement(&quot;child&quot;)&lt;/div&gt;&lt;div&gt;        xw.WriteString(&quot;sample20&quot;)&lt;/div&gt;&lt;div&gt;        xw.WriteEndElement()&lt;/div&gt;&lt;div&gt;        xw.WriteStartElement(&quot;child&quot;)&lt;/div&gt;&lt;div&gt;        xw.WriteString(&quot;sample21&quot;)&lt;/div&gt;&lt;div&gt;        xw.WriteEndElement()&lt;/div&gt;&lt;div&gt;        xw.WriteEndElement()&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;        xw.WriteStartElement(&quot;node&quot;, &quot;&quot;)&lt;/div&gt;&lt;div&gt;        xw.WriteStartAttribute(&quot;id&quot;, &quot;&quot;)&lt;/div&gt;&lt;div&gt;        xw.WriteString(&quot;3&quot;)&lt;/div&gt;&lt;div&gt;        xw.WriteEndAttribute()&lt;/div&gt;&lt;div&gt;        xw.WriteStartElement(&quot;child&quot;)&lt;/div&gt;&lt;div&gt;        xw.WriteString(&quot;sample30&quot;)&lt;/div&gt;&lt;div&gt;        xw.WriteEndElement()&lt;/div&gt;&lt;div&gt;        xw.WriteStartElement(&quot;child&quot;)&lt;/div&gt;&lt;div&gt;        xw.WriteString(&quot;sample31&quot;)&lt;/div&gt;&lt;div&gt;        xw.WriteEndElement()&lt;/div&gt;&lt;div&gt;        xw.WriteEndElement()&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;        xw.WriteEndElement()&lt;/div&gt;&lt;div&gt;        xw.Flush()&lt;/div&gt;&lt;div&gt;        xw.Close()&lt;/div&gt;&lt;div&gt;        Process.Start(&quot;C:\mySampleXml.xml&quot;)&lt;/div&gt;&lt;div&gt;    End Sub&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:large;&quot;&gt;Insert Data in XML File&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;div&gt;Private Sub InsertDataToXmlFile()&lt;/div&gt;&lt;div&gt;        Dim xDoc As New XmlDocument&lt;/div&gt;&lt;div&gt;        xDoc.Load(&quot;C:\mySampleXml.xml&quot;)&lt;/div&gt;&lt;div&gt;        Dim sourceRootNode As XmlNode = xDoc.SelectSingleNode(&quot;/nodes/node[@id=2]&quot;) &#39;Slects the root &#39;nodes&#39;&lt;/div&gt;&lt;div&gt;        Dim newChildNode As XmlNode = xDoc.CreateNode(XmlNodeType.Element, &quot;child&quot;, &quot;&quot;)&lt;/div&gt;&lt;div&gt;        newChildNode.InnerText = &quot;New Sample 22&quot;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;        &#39;Child with attribute&lt;/div&gt;&lt;div&gt;        Dim newChildNode1 As XmlNode = xDoc.CreateNode(XmlNodeType.Element, &quot;child&quot;, &quot;&quot;)&lt;/div&gt;&lt;div&gt;        Dim atr As XmlAttribute = xDoc.CreateAttribute(&quot;childID&quot;)&lt;/div&gt;&lt;div&gt;        atr.Value = &quot;ch1&quot;&lt;/div&gt;&lt;div&gt;        newChildNode1.InnerText = &quot;New Sample 23&quot;&lt;/div&gt;&lt;div&gt;        newChildNode1.Attributes.Append(atr)&lt;/div&gt;&lt;div&gt;        sourceRootNode.AppendChild(newChildNode)&lt;/div&gt;&lt;div&gt;        sourceRootNode.AppendChild(newChildNode1)&lt;/div&gt;&lt;div&gt;        xDoc.Save(&quot;C:\mySampleXml.xml&quot;)&lt;/div&gt;&lt;div&gt;        Process.Start(&quot;C:\mySampleXml.xml&quot;)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    End Sub&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:large;&quot;&gt;Modify Data in XML File&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;div&gt;    Private Sub ModifyDataInXmlFile()&lt;/div&gt;&lt;div&gt;        Dim xDoc As New XmlDocument&lt;/div&gt;&lt;div&gt;        xDoc.Load(&quot;C:\mySampleXml.xml&quot;)&lt;/div&gt;&lt;div&gt;        Dim desiredNode As XmlNode = xDoc.SelectSingleNode(&quot;/nodes/node[@id=2]&quot;)&lt;/div&gt;&lt;div&gt;        Dim childNodes As XmlNodeList = desiredNode.SelectNodes(&quot;./child&quot;) &#39;&#39;.&#39; specifies the current node and &#39;/child&#39; specifies child nodes&lt;/div&gt;&lt;div&gt;        For Each curNode As XmlNode In childNodes&lt;/div&gt;&lt;div&gt;            If curNode.HasChildNodes = True Then&lt;/div&gt;&lt;div&gt;                If curNode.Attributes.Count &gt; 0 Then&lt;/div&gt;&lt;div&gt;                    If curNode.Attributes(&quot;childID&quot;).Value = &quot;ch1&quot; Then&lt;/div&gt;&lt;div&gt;                        curNode.InnerText = &quot;Updated Sample 23&quot;&lt;/div&gt;&lt;div&gt;                    End If&lt;/div&gt;&lt;div&gt;                End If&lt;/div&gt;&lt;div&gt;            End If&lt;/div&gt;&lt;div&gt;        Next&lt;/div&gt;&lt;div&gt;        xDoc.Save(&quot;C:\mySampleXml.xml&quot;)&lt;/div&gt;&lt;div&gt;        Process.Start(&quot;C:\mySampleXml.xml&quot;)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    End Sub&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:large;&quot;&gt;Delete Data in XML File&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;    Private Sub RemoveDataFromXmlFile()&lt;/div&gt;&lt;div&gt;        Dim xDoc As New XmlDocument&lt;/div&gt;&lt;div&gt;        xDoc.Load(&quot;C:\mySampleXml.xml&quot;)&lt;/div&gt;&lt;div&gt;        Dim desiredNode As XmlNode = xDoc.SelectSingleNode(&quot;/nodes/node[@id=2]&quot;)&lt;/div&gt;&lt;div&gt;        Dim childNodes As XmlNodeList = desiredNode.SelectNodes(&quot;./child&quot;) &#39;&#39;.&#39; specifies the current node and &#39;/child&#39; specifies child nodes&lt;/div&gt;&lt;div&gt;        For Each curNode As XmlNode In childNodes&lt;/div&gt;&lt;div&gt;            If curNode.HasChildNodes = True Then&lt;/div&gt;&lt;div&gt;                If curNode.Attributes.Count &gt; 0 Then&lt;/div&gt;&lt;div&gt;                    If curNode.Attributes(&quot;childID&quot;).Value = &quot;ch1&quot; Then&lt;/div&gt;&lt;div&gt;                        curNode.ParentNode.RemoveChild(curNode)&lt;/div&gt;&lt;div&gt;                    End If&lt;/div&gt;&lt;div&gt;                End If&lt;/div&gt;&lt;div&gt;            End If&lt;/div&gt;&lt;div&gt;        Next&lt;/div&gt;&lt;div&gt;        Dim anotherDesiredNode As XmlNode = xDoc.SelectSingleNode(&quot;/nodes/node[@id=2]&quot;)&lt;/div&gt;&lt;div&gt;        anotherDesiredNode.ParentNode.RemoveChild(anotherDesiredNode)&lt;/div&gt;&lt;div&gt;        xDoc.Save(&quot;C:\mySampleXml.xml&quot;)&lt;/div&gt;&lt;div&gt;        Process.Start(&quot;C:\mySampleXml.xml&quot;)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    End Sub&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Please give any suggestions for better coding. Also add code for other possible cases that can be  possible for other various situations.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbdotnettips.blogspot.com/feeds/3303946413674600991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/230222142169020147/3303946413674600991' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/3303946413674600991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/230222142169020147/posts/default/3303946413674600991'/><link rel='alternate' type='text/html' href='http://vbdotnettips.blogspot.com/2009/04/xml-operations-create-xml-insert-data.html' title='XML Operations: Create XML, Insert Data, Modify Data and Delete Data in XML File'/><author><name>jivangoyal</name><uri>http://www.blogger.com/profile/12853371042810428434</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>