<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>The Menace Blog : Visual Basic</title><link>http://weblogs.asp.net/dennisthemenace/archive/tags/Visual+Basic/default.aspx</link><description>Tags: Visual Basic</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Access Modifiers</title><link>http://weblogs.asp.net/dennisthemenace/archive/2009/09/16/access-modifiers.aspx</link><pubDate>Wed, 16 Sep 2009 17:33:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7208393</guid><dc:creator>Dennis</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/dennisthemenace/rsscomments.aspx?PostID=7208393</wfw:commentRss><comments>http://weblogs.asp.net/dennisthemenace/archive/2009/09/16/access-modifiers.aspx#comments</comments><description>&lt;p&gt;There are still a lot of confusion between access modifiers especially some keywords such as friend, protected, and protected friend. This post is meant to clear things up and distinguish the keywords from each other. Take note that C# keywords are in lower-case (Pascal notation is used below to simply things). In a lot of cases, Private and Public will suffice but there will be instances where you need to limit some exposure to certain types and members -- the logic behind encapsulation.&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Public&lt;/b&gt;&lt;br&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Full accessibility which includes accessibility between different assemblies.&lt;/li&gt;&lt;li&gt;Default for enums and interfaces.&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;b&gt;Private&lt;/b&gt;&lt;br&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Accessible only within the containing type.&lt;/li&gt;&lt;li&gt;Default for members of classes and structs.&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;b&gt;Protected&lt;/b&gt;&lt;br&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Accessible within the containing type.&lt;/li&gt;&lt;li&gt;Accessible by an inheriting type (subclass); but not visible through the base class.&lt;/li&gt;&lt;li&gt;Similar to Private in nature but is accessible when the type is inherited.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;b&gt;Friend&lt;/b&gt;&lt;b&gt; (VB) / Internal (C#)&lt;/b&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Accessible anywhere strictly within the same assembly.&lt;/li&gt;&lt;li&gt;Default for non-nested types.&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Protected Friend (VB) / Protected Internal (C#)&lt;/b&gt;&lt;br&gt;&lt;ul&gt;&lt;li&gt;Includes both the capabilities of Protected and Friend/Internal.&lt;/li&gt;&lt;li&gt;Since Protected and Friend have differentiating restrictions, the two combined opens up doors in terms of accessibility rather than to merge or restrict.&lt;/li&gt;&lt;ul&gt;&lt;li&gt;For instance: a method is now accessible within the same assembly, and at the same time accessible outside as long as the said type member is inherited.&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7208393" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/dennisthemenace/archive/tags/Visual+Basic/default.aspx">Visual Basic</category><category domain="http://weblogs.asp.net/dennisthemenace/archive/tags/c_2300_/default.aspx">c#</category></item><item><title>No love for VB?</title><link>http://weblogs.asp.net/dennisthemenace/archive/2008/03/17/no-love-for-vb.aspx</link><pubDate>Mon, 17 Mar 2008 21:55:43 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5989454</guid><dc:creator>Dennis</dc:creator><slash:comments>14</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/dennisthemenace/rsscomments.aspx?PostID=5989454</wfw:commentRss><comments>http://weblogs.asp.net/dennisthemenace/archive/2008/03/17/no-love-for-vb.aspx#comments</comments><description>&lt;p&gt;I'm looking around on books that evolves around ASP.NET and I'm starting to see a common pattern among a lot of the books. In most cases, they are predominantly written in C# leaving no alternate code in VB. I know that C# is being pushed by a lot of developers to be a better choice (this is debatable), but I just don't understand why there is a favor towards a single programming language (C# in this case). I'm a VB programmer myself and I know that C# is pretty similar and shouldn't be hard to learn, but the same concern goes the other way around. If most technical books are written in VB, then I'm pretty sure that the C# community will have the same concern as well.&lt;/p&gt;  &lt;p&gt;Believe it or not, there are still plenty of VB programmers out there, and it looks like the resources available (books, articles, etc.) are getting slimmer by the day. I recently purchased Professional ASP.NET 3.5 in C# and VB and found it a great book since it caters to both programming languages. The price/value of the book is respectable as the authors took the time to accommodate both languages. So why don't the other authors do the same thing? Is this too much to ask for?&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5989454" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/dennisthemenace/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/dennisthemenace/archive/tags/Visual+Basic/default.aspx">Visual Basic</category><category domain="http://weblogs.asp.net/dennisthemenace/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>Insertion of a page break in a repeater</title><link>http://weblogs.asp.net/dennisthemenace/archive/2008/01/25/insertion-of-a-page-break-in-a-repeater.aspx</link><pubDate>Fri, 25 Jan 2008 18:49:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5651445</guid><dc:creator>Dennis</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/dennisthemenace/rsscomments.aspx?PostID=5651445</wfw:commentRss><comments>http://weblogs.asp.net/dennisthemenace/archive/2008/01/25/insertion-of-a-page-break-in-a-repeater.aspx#comments</comments><description>&lt;p&gt;I was in a situation where I need to break up the data into a separate page after a certain amount of records (in my case 3). I chose to use repeater as I have a full control of the HTML layout and how I want my form to appear in a print format. I posted my question in ASP.NET forums and to my delight received a working code after a full day of torture and doing search in Google. I thought I would share here the snippet that can be useful when a specific scenario arise. It is not a lot of code but it saved me another day of frustration. Now it's time to put it on the side and move on with new projects.&lt;/p&gt;&lt;p&gt;The code below can be altered by changing the page size. Take note that the sub procedure below uses ItemDataBound event, which occurs after the binding of data and before it's displayed on the page (print in this case).&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Protected Sub Repeater1_ItemDataBound(ByVal sender As Object, ByVal e As RepeaterItemEventArgs) Handles Repeater1.ItemDataBound&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pageSize As Integer = 3&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If (e.Item.ItemType = ListItemType.Item OrElse e.Item.ItemType = ListItemType.AlternatingItem) AndAlso ((e.Item.ItemIndex + 1) Mod pageSize = 0) Then&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.Item.Controls.Add(New LiteralControl("&amp;lt;p style='PAGE-BREAK-AFTER: always'&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;"))&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub &lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5651445" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/dennisthemenace/archive/tags/Visual+Basic/default.aspx">Visual Basic</category><category domain="http://weblogs.asp.net/dennisthemenace/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item></channel></rss>