Skip to main content

Posts

Showing posts from 2011

Hard Reset the Palm Treo Pro

Hard Reset will delete all your data and reset the phone to the factory settings: While the phone is on, soft reset it while holding End . Continue pressing and holding End until the "Erase all data?" prompt appears. Press Up to confirm the hard reset. Wait for the progress bar on the Treo logo screen to fill before continuing to use your smartphone. Slide the back panel into place.

C# Virtual

The  virtual  keyword is used to modify a method, property, indexer, or event declaration and allow for it to be overridden in a derived class. For example, this method can be overridden by any class that inherits it. public virtual double Area() { return x * y; } When a virtual method is invoked, the run-time type of the object is checked for an overriding member. The overriding member in the most derived class is called, which might be the original member, if no derived class has overridden the member. By default, methods are non-virtual. You cannot override a non-virtual method. You cannot use the  virtual  modifier with the  static ,  abstract, private , or  override  modifiers. Click here for more info.

C# ArrayList

C# ArrayList is used when there is a need for variable size array: using System; using System.Collections; namespace ConsoleApplication1 {     class Program     {         static void Main( string [] args)         {             ArrayList List1 = new ArrayList ();             ArrayList List2 = new ArrayList ();             List1.Add( "B" );             List1.Add( "A" );             List1.Add( "C" );             Console .WriteLine( "Shows Added valuess" );            ...

Windows Phone 7 development Error

I tried to debug a Windows Phone 7 application in Visual Studio 2010 when I received the error “Zune Software is not installed. Install the latest version of Zune software”, it turned out I did not select the correct deployment target for the project, I had “Windows Phone 7 Device” selected instead of “Windows Phone 7 Emulator.

Selecting a Single value using LINQ to SQL

TablesDataContext myDB = new TablesDataContext (); String stVar = (    from   table in myDB.DBTable                     where        table.column1 == "…." && table.column2 == "….."                     select        table.StringColumn).Single(); int intVar    = (    from   table in myDB.DBTable                      where table.column == "..."                      select table.intColumn).Single().Value;