<?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: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-34535410</id><updated>2011-12-14T18:57:40.999-08:00</updated><title type='text'>Rushabh's .NET Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://joshirushabh.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535410/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://joshirushabh.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Rushabh</name><uri>http://www.blogger.com/profile/05601016671116573126</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-34535410.post-116000863011270664</id><published>2006-10-04T16:00:00.000-07:00</published><updated>2006-10-11T10:40:15.190-07:00</updated><title type='text'>.NET Developer beginning Ruby (rails) - Part 1</title><content type='html'>Now that I am &lt;a href="http://joshirushabh.blogspot.com/2006/09/net-developers-first-look-at-rubyrails.html"&gt;hooked on to Ruby (rails)&lt;/a&gt;, I am teaching myself Ruby using this &lt;a href="http://www.rubycentral.com/book/index.html"&gt;book&lt;/a&gt;. I have decided to post about Ruby features which impress me as a .NET developer, in the form of a series of posts. So, here is my first one…&lt;br /&gt;&lt;br /&gt;In Ruby, you can define a "code block". All lines of code enclosed within the curly braces (or do ...end) make one code block.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;{ puts "Hello World!" ...}&lt;br /&gt;# OR&lt;br /&gt;do puts "Hello World!" ... end&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Also, you can make a code block and a method "talk" to each other. Here is a simple example:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;strong&gt;def methodSimple()&lt;/strong&gt;&lt;br /&gt;# execute code block associated with the method call&lt;br /&gt;yield &lt;br /&gt;&lt;strong&gt;end&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;# Call methodSimple&lt;br /&gt;methodSimple() { doSomthing1() doSomething2() }&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;In the example above, "doSomething1" and "doSomething2" will be executed when the interpreter reaches the "yield" (special) statement in methodSimple. We can also make "methodSimple" pass parameters to the code block by making the following changes:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;strong&gt;def methodSimple()&lt;/strong&gt;&lt;br /&gt;# execute code block associated with the method call&lt;br /&gt;yield(param) &lt;br /&gt;&lt;strong&gt;end&lt;/strong&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;!--&lt;br /&gt;google_ad_client = "pub-7582504291212478";&lt;br /&gt;google_ad_width = 728;&lt;br /&gt;google_ad_height = 15;&lt;br /&gt;google_ad_format = "728x15_0ads_al_s";&lt;br /&gt;google_ad_channel ="";&lt;br /&gt;google_color_border = "FFFFFF";&lt;br /&gt;google_color_bg = "FFFFFF";&lt;br /&gt;google_color_link = "DE7008";&lt;br /&gt;google_color_text = "333333";&lt;br /&gt;google_color_url = "666666";&lt;br /&gt;//--&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&lt;br /&gt;  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;# Call methodSimple&lt;br /&gt;methodSimple() {|param| doSomthing1(param) doSomething2() }&lt;br /&gt;&lt;/code&gt;This is interesting right? Let us try a more useful example:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;strong&gt;class Website&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;  def initialize() &lt;/strong&gt;&lt;br /&gt;    @header = "Header"&lt;br /&gt;    @footer = "Footer"&lt;br /&gt;    @content = "Content"&lt;br /&gt;&lt;strong&gt;  end &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt; def displayPage &lt;/strong&gt;&lt;br /&gt;    # Display site header&lt;br /&gt;    display(@header)&lt;br /&gt;&lt;br /&gt;    # Display article content &lt;br /&gt;   &lt;font color=green&gt; display(yield(@content))&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;    # Display the site footer&lt;br /&gt;    display(@footer)&lt;br /&gt; &lt;strong&gt;  end &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;end &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;# English version of the website&lt;br /&gt;w1= Website.new()&lt;br /&gt;w1.displayPage() { |content| return translate_to_english(content)}&lt;br /&gt;# Hindi version of the website&lt;br /&gt;w2 = Website.new()&lt;br /&gt;w2.displayPage() { |content| return translate_to_hindi(content)}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Most of the code is trivial. Notice the &lt;em&gt;display(yield(@content))&lt;/em&gt; line in the displayPage method. This is what is happening there :&lt;ul&gt;&lt;li&gt;The page "content" is passed to the code block.&lt;br /&gt;&lt;li&gt;Code block translates it to English(w1) or Hindi(w2) and returns it back to the displayPage method.&lt;br /&gt;&lt;li&gt;displayPage method displays the translated version of the "content".&lt;/ul&gt;What did we gain by doing this? Our "Website" class remains independent of the translation logic. I think, we can make use of the "Code block" feature in Ruby to write more generic code.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7582504291212478";
google_ad_width = 728;
google_ad_height = 15;
google_ad_format = "728x15_0ads_al_s";
google_ad_channel ="";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "DE7008";
google_color_text = "333333";
google_color_url = "666666";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;
&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535410-116000863011270664?l=joshirushabh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://joshirushabh.blogspot.com/feeds/116000863011270664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535410&amp;postID=116000863011270664' title='299 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535410/posts/default/116000863011270664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535410/posts/default/116000863011270664'/><link rel='alternate' type='text/html' href='http://joshirushabh.blogspot.com/2006/10/net-developer-beginning-ruby-rails.html' title='.NET Developer beginning Ruby (rails) - Part 1'/><author><name>Rushabh</name><uri>http://www.blogger.com/profile/05601016671116573126</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>299</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535410.post-115967437932425636</id><published>2006-09-30T20:38:00.000-07:00</published><updated>2006-10-02T16:08:35.620-07:00</updated><title type='text'>.NET developer's first look at Ruby(rails)</title><content type='html'>Ok so ...all the buzz about &lt;strong&gt;Ruby on Rails&lt;/strong&gt; finally got to me and I decided to check out the &lt;a href="http://www.rubyonrails.org/"&gt;official website&lt;/a&gt; and see what I am missing. &lt;br /&gt;&lt;br /&gt;This is what I had heard about &lt;strong&gt;Ruby on rails&lt;/strong&gt;:&lt;ul&gt;&lt;li&gt;It is a framework written in scripting language &lt;a href="http://www.ruby-lang.org/en/"&gt;Ruby&lt;/a&gt;&lt;br /&gt;&lt;li&gt;This framework does the ORM mapping for you automatically and so you get a DAL    without breaking a sweat.&lt;/ul&gt;After several minutes of browsing, I now know that:&lt;ul&gt;&lt;li&gt;Rails follows the Model-View-Control pattern.&lt;br /&gt;&lt;li&gt;Rails makes it easy to include AJAX in our Web apps. (still have to see some examples of this)&lt;br /&gt;&lt;li&gt;Ruby is an object oriented scripting language where everything is an object.&lt;br /&gt;&lt;li&gt;Ruby is an extremely dynamic language. You can write stuff like: &lt;br /&gt;&lt;code&gt;&lt;br /&gt;' Does object "g" have a method named "name"&lt;br /&gt;g.respond_to?("name")&lt;br /&gt;&lt;/code&gt;&lt;/ul&gt;&lt;br /&gt;Pretty cool huh!! However because of my .NET and PHP background, it took me a while to get used to the Ruby syntax. Here is some Ruby code to display all items of array "names".&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@names.each do&lt;br /&gt;      |name|&lt;br /&gt;      puts "Hello #{name}!"&lt;br /&gt;    end&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Maybe it is just a matter of getting used to. Anyway, If I have gotten you excited about Ruby(rails) and you want to check it out yourself, I strongly recommend &lt;a href="http://tryruby.hobix.com/"&gt;this 15 minute interactive Ruby tutorial&lt;/a&gt; .&lt;br /&gt;&lt;br /&gt;I am going to download this Ruby &lt;a href="http://www.radrails.org/"&gt;editor&lt;/a&gt; for windows next and write some "hello world" type programs. Based on how things look right now ...I might have to do this in the future:&lt;br /&gt;&lt;br /&gt;MyBlog.Title[".NET"] = "Ruby on Rails"&lt;br /&gt;&lt;br /&gt;Get it?&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7582504291212478";
google_ad_width = 728;
google_ad_height = 15;
google_ad_format = "728x15_0ads_al_s";
google_ad_channel ="";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "DE7008";
google_color_text = "333333";
google_color_url = "666666";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;
&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535410-115967437932425636?l=joshirushabh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://joshirushabh.blogspot.com/feeds/115967437932425636/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535410&amp;postID=115967437932425636' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535410/posts/default/115967437932425636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535410/posts/default/115967437932425636'/><link rel='alternate' type='text/html' href='http://joshirushabh.blogspot.com/2006/09/net-developers-first-look-at-rubyrails.html' title='.NET developer&apos;s first look at Ruby(rails)'/><author><name>Rushabh</name><uri>http://www.blogger.com/profile/05601016671116573126</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535410.post-115956890996282472</id><published>2006-09-29T15:26:00.000-07:00</published><updated>2006-09-29T15:28:29.986-07:00</updated><title type='text'>Best practices for .Net Performance</title><content type='html'>Pretty useful article:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.c-sharpcorner.com/UploadFile/bhakeeswaran/BPNetPerformance107292006234943PM/BPNetPerformance1.aspx"&gt;http://www.c-sharpcorner.com/UploadFile/bhakeeswaran/BPNetPerformance107292006234943PM/BPNetPerformance1.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7582504291212478";
google_ad_width = 728;
google_ad_height = 15;
google_ad_format = "728x15_0ads_al_s";
google_ad_channel ="";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "DE7008";
google_color_text = "333333";
google_color_url = "666666";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;
&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535410-115956890996282472?l=joshirushabh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://joshirushabh.blogspot.com/feeds/115956890996282472/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535410&amp;postID=115956890996282472' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535410/posts/default/115956890996282472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535410/posts/default/115956890996282472'/><link rel='alternate' type='text/html' href='http://joshirushabh.blogspot.com/2006/09/best-practices-for-net-performance.html' title='Best practices for .Net Performance'/><author><name>Rushabh</name><uri>http://www.blogger.com/profile/05601016671116573126</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535410.post-115861593452953021</id><published>2006-09-18T14:44:00.000-07:00</published><updated>2006-09-18T15:01:55.703-07:00</updated><title type='text'>In quest of Truly Modal popup in ASP.NET</title><content type='html'>This is how it all started...I stumbled upon this cool Modal popup control in the Atlas control kit:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://atlas.asp.net/atlastoolkit/ModalPopup/ModalPopup.aspx"&gt;http://atlas.asp.net/atlastoolkit/ModalPopup/ModalPopup.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Notice how it blocks the activity on the screen until you are done interacting with the popup. I decided to put this in one of my ASP.NET web applications. But this control immediately became useless to me because I wanted to display the popup based on some logic in the application and the Atlas popup control can only be bound to an ASP.NET control. &lt;br /&gt;&lt;br /&gt;After googling on this topic a bit it was clear to me that it cannot be done without using JavaScript (which I was hoping to avoid). I also found this interesting article which explains "how to fill in ASP.NET gaps using client-side magic"&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.ondotnet.com/pub/a/dotnet/2003/09/15/aspnet.html"&gt;http://www.ondotnet.com/pub/a/dotnet/2003/09/15/aspnet.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here is some sample code from this article which shows how to include JavaScript in your ASP.NET code using Page.RegisterStartupScript method.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;string popupScript = "window.open('PopUp.aspx', 'CustomPopUp', " +&lt;br /&gt;  "'width=200, height=200, menubar=yes, resizable=no')" +&lt;br /&gt;  &lt;br /&gt;Page.RegisterStartupScript("PopupScript", popupScript);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;The Javascript will get placed in the onLoad() event of the page and hence will be executed as soon as the page loads (which would create a popup effect). So now I had an efficient way of managing Javascript in my ASP.NET application. But I still needed the JavaScript for the modal popup when I hit this gem (click on [Test the Alert]) :&lt;br /&gt;&lt;br /&gt;&lt;a href="http://slayeroffice.com/code/custom_alert/"&gt;http://slayeroffice.com/code/custom_alert/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Also notice how the alert box remains frozen even if you scroll up and down the page. Very COOL!!&lt;br /&gt;&lt;br /&gt;The approach is to over-ride the default window.alert javascript function. The person who made this calls it "Pseudo-modality" because this is achieved by using a 100% wide and 100% tall absolutely positioned DIV element that acts as the parent element of the custom alert. This DIV overlays everything on the page and prevents user interaction with elements other than the custom alert.&lt;br /&gt;&lt;br /&gt;So now I have this cool Javascript code and also know how to use the Page.RegisterStartupScript method to put Javascript in my ASP.NET application in an organized way. I can't wait to implement this in my application. &lt;br /&gt;&lt;br /&gt;I will post about how that goes some other time ...&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7582504291212478";
google_ad_width = 728;
google_ad_height = 15;
google_ad_format = "728x15_0ads_al_s";
google_ad_channel ="";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "DE7008";
google_color_text = "333333";
google_color_url = "666666";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;
&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535410-115861593452953021?l=joshirushabh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://joshirushabh.blogspot.com/feeds/115861593452953021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535410&amp;postID=115861593452953021' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535410/posts/default/115861593452953021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535410/posts/default/115861593452953021'/><link rel='alternate' type='text/html' href='http://joshirushabh.blogspot.com/2006/09/in-quest-of-truly-modal-popup-in.html' title='In quest of Truly Modal popup in ASP.NET'/><author><name>Rushabh</name><uri>http://www.blogger.com/profile/05601016671116573126</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535410.post-115851554837392394</id><published>2006-09-17T09:45:00.000-07:00</published><updated>2006-09-24T23:35:46.760-07:00</updated><title type='text'>Enum and CallbyName .NET example</title><content type='html'>As some of you already know …I am working on cleaning up (re-writing) report generator tool (written in VB.NET) at work. Following impressed some of my colleagues, and so I am putting it here. Please feel free to comment your opinions on this approach …&lt;br /&gt;&lt;br /&gt;I created an enum, which holds a list of all date validations that should be applied to a “report”.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;strong&gt;Public Enum defaultDateValidation&lt;/strong&gt;  &lt;br /&gt;      blankDates 'Verify that user has supplied “From” and “To” dates&lt;br /&gt;        FourDigitYear ' Verify that user supplied dates have year in 4 digit format&lt;br /&gt;   &lt;strong&gt; End Enum&lt;/strong&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Then I have the following validation functions somewhere in my class …&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;strong&gt;public function blankDates() as boolean&lt;/strong&gt;&lt;br /&gt;' See if dates were actually suuplied and return true or false accordngly &lt;br /&gt;msgbox (....)&lt;br /&gt;return true/false&lt;br /&gt;&lt;strong&gt;end function&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;public function FourDigitYear() as boolean&lt;/strong&gt;&lt;br /&gt;' See if dates are in 4 digit format and return true or false accordingly&lt;br /&gt;msgbox (....)&lt;br /&gt;return true/false&lt;br /&gt;&lt;strong&gt;end function&lt;/strong&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;And finally here is the glue code that gets executed when input dates for the report are accepted from the user and it is time to perform date validations.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  Dim dateValidation As String&lt;br /&gt;        For Each dateValidation In System.Enum.GetNames(GetType(defaultDateValidation))&lt;br /&gt;         If Not CallByName(Me, dateValidation, CallType.Method) Then&lt;br /&gt;                Exit Sub&lt;br /&gt;            End If&lt;br /&gt;    Next&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;HINT: Notice that the enum instances and the corresponding validation functions have the same name.&lt;br /&gt;&lt;br /&gt;For the uninitiated - I am looping through all the Enum instances (using For each) and calling a function that has the same name as the Enum instance (using CallByName). &lt;br /&gt;&lt;br /&gt;Why do it this way? I think this code is easier to maintain. Suppose I (or my fellow software developers) have to add another validation type called “myBirthMonth” for a new report. To achieve this we would just have to create a new entry “MyBirthMonth” in the defaultDateValidation Enum and then create a boolean function (with the same name ofcourse) that does the actual validation. And my glue code will take care of the rest.&lt;br /&gt;&lt;br /&gt;If you liked this post, please subscribe to the RSS feed of this blog.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7582504291212478";
google_ad_width = 728;
google_ad_height = 15;
google_ad_format = "728x15_0ads_al_s";
google_ad_channel ="";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "DE7008";
google_color_text = "333333";
google_color_url = "666666";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;
&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535410-115851554837392394?l=joshirushabh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://joshirushabh.blogspot.com/feeds/115851554837392394/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535410&amp;postID=115851554837392394' title='55 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535410/posts/default/115851554837392394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535410/posts/default/115851554837392394'/><link rel='alternate' type='text/html' href='http://joshirushabh.blogspot.com/2006/09/enum-and-callbyname-net-example.html' title='Enum and CallbyName .NET example'/><author><name>Rushabh</name><uri>http://www.blogger.com/profile/05601016671116573126</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>55</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535410.post-115844723669417655</id><published>2006-09-16T15:51:00.000-07:00</published><updated>2006-09-17T09:03:27.486-07:00</updated><title type='text'>Cannot bind to the new display member</title><content type='html'>I am working on an internal "report generator" tool at work. One of the forms has a listbox control. This is what I was trying to do:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;' myHashTable holds objects of type "Report"&lt;br /&gt;ListBox.DataSource = myHashTable.Values&lt;br /&gt;ListBox.DisplayMember = "ReportName"&lt;br /&gt;ListBox.ValueMember = "ReportCode"&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This looks pretty straight forward. But when I ran the code, I got "Cannot bind to the new value member" exception. Googling this error did not get me anywhere. While mucking aound with the code I changed "ReportName" and "ReportCode" in my "Report" class from &lt;u&gt;members to properties&lt;/u&gt;. And WALLA this worked!!&lt;br /&gt;&lt;br /&gt;Hopefully this post will save someone a headache.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7582504291212478";
google_ad_width = 728;
google_ad_height = 15;
google_ad_format = "728x15_0ads_al_s";
google_ad_channel ="";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "DE7008";
google_color_text = "333333";
google_color_url = "666666";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;
&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535410-115844723669417655?l=joshirushabh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://joshirushabh.blogspot.com/feeds/115844723669417655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535410&amp;postID=115844723669417655' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535410/posts/default/115844723669417655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535410/posts/default/115844723669417655'/><link rel='alternate' type='text/html' href='http://joshirushabh.blogspot.com/2006/09/cannot-bind-to-new-display-member.html' title='Cannot bind to the new display member'/><author><name>Rushabh</name><uri>http://www.blogger.com/profile/05601016671116573126</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34535410.post-115843990615947729</id><published>2006-09-16T13:43:00.000-07:00</published><updated>2006-09-16T14:01:09.566-07:00</updated><title type='text'>My First Blog</title><content type='html'>This is my "Hello World" blog.&lt;br /&gt;&lt;br /&gt;I have always wanted to blog about issue--&gt;solution---&gt; issue cycle I go through day to day at my job as a full-time software developer.&lt;br /&gt;&lt;br /&gt;Lets see how this goes ....&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7582504291212478";
google_ad_width = 728;
google_ad_height = 15;
google_ad_format = "728x15_0ads_al_s";
google_ad_channel ="";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "DE7008";
google_color_text = "333333";
google_color_url = "666666";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;
&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34535410-115843990615947729?l=joshirushabh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://joshirushabh.blogspot.com/feeds/115843990615947729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34535410&amp;postID=115843990615947729' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34535410/posts/default/115843990615947729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34535410/posts/default/115843990615947729'/><link rel='alternate' type='text/html' href='http://joshirushabh.blogspot.com/2006/09/my-first-blog.html' title='My First Blog'/><author><name>Rushabh</name><uri>http://www.blogger.com/profile/05601016671116573126</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
