Posts

Google searching tips

Explicit Phrase: Lets say you are looking for content about internet marketing.  Instead of just typing  internet marketing  into the Google search box, you will likely be better off searching explicitly for the phrase.  To do this, simply enclose the search phrase within double quotes. Example: "internet marketing" Exclude Words: Lets say you want to search for content about internet marketing, but you want to exclude any results that contain the term  advertising .  To do this, simply use the "-" sign in front of the word you want to exclude. Example Search: internet marketing -advertising Site Specific Search: Often, you want to search a specific website for content that matches a certain phrase.  Even if the site doesn’t support a built-in search feature, you can use Google to search the site for your term. Simply use the "site:somesite.com" modifier. Example: "internet marketing" site:www.smallbusinesshub.com

DllImport in C# vs VB.NET (unmanaged DLL Import)

The following code example shows how to use the  DllImportAttribute  attribute to import the Win32  MessageBox  function. The code example then calls the imported method. C# using System; using System.Runtime.InteropServices; class Example { // Use DllImport to import the Win32 MessageBox function. [DllImport( "user32.dll" , CharSet = CharSet.Unicode)] public static extern int MessageBox(IntPtr hWnd, String text, String caption, uint type); static void Main() { // Call the MessageBox function using platform invoke. MessageBox( new IntPtr(0), "Hello World!" , "Hello Dialog" , 0); } }

How to open visual studio 2010 projects in visual studio 2008 (downgrade from VS 2010 to VS 2008)

1.Make back up of your .sln file   2.Open the .sln file corresponding to the Project to be converted with Notepad   Locate the following line: Microsoft Visual Studio Solution File, Format Version 11.00 Replace 11.00 with 10.00 3.Locate the following line: # Visual Studio 10 4.Replace 2010 with 2008 5.Save the File 6.Delete the .cache files existing in the following paths: * obj/debug * obj/release 7.Open the project with Visual Studio 2008 8.Build the project with Visual Studio 2008

How to enable hidden administrator account in windows 7 - Vista

Image
First you’ll need to open a command prompt in administrator mode by right-clicking and choosing “Run as administrator” (or use the Ctrl+Shift+Enter shortcut from the search box) Now type the following command: net user administrator /active:yes  You should see a message that the command completed successfully. Log out, and you’ll now see the Administrator account as a choice.

.NET Framwork Tools

Image
Develop, configure, and deploy applications by using Microsoft .NET Framework technologies http://msdn.microsoft.com/en-us/library/d9kh6s92(v=vs.90) [MSDN LINKS] Configuration and Deployment Tools Debugging Tools Security Tools General Tools SDK Command Prompt Assembly Linker (Al.exe) ASP.NET Compilation Tool (Aspnet_compiler.exe) ASP.NET Merge Tool (Aspnet_merge.exe) ASP.NET Browser Registration Tool (Aspnet_regbrowsers.exe) ASP.NET IIS Registration Tool (Aspnet_regiis.exe) ASP.NET SQL Server Registration Tool (Aspnet_regsql.exe) Windows Forms ActiveX Control Importer (Aximp.exe) Code Access Security Policy Tool (Caspol.exe) Code Generation Tool (SqlMetal.exe) Software Publisher Certificate Test Tool (Cert2spc.exe) Certificate Manager Tool (Certmgr.exe) Certificate Verification Tool (Chktrust.exe) Runtime Debugger (Cordbg.exe) CorFlags Conversion Tool (CorFlags.exe) Assembly Binding Log Viewer (Fuslogvw.exe) Global Assembly Cache Tool (Gacutil.exe) MSIL Assembler (Ilasm.exe...

Partial Keyword in C#

A partial method has its signature defined in one part of a partial type, and its implementation defined in another part of the type. Partial methods enable class designers to provide method hooks, similar to event handlers, that developers may decide to implement or not. If the developer does not supply an implementation, the compiler removes the signature at compile time. The following conditions apply to partial methods: Signatures in both parts of the partial type must match. The method must return void. No access modifiers or attributes are allowed. Partial methods are implicitly private. The following example shows a partial method defined in two parts of a partial class: namespace PM { partial class A { partial void OnSomethingHappened( string s); } // This part can be in a separate file. partial class A { // Comment out this method and the program // will still compile. partial void OnSomethingHapp...

Override in c#

The  override  modifier is required to extend or modify the abstract or virtual implementation of an inherited method, property, indexer, or event. In this example, the  Square  class must provide an overridden implementation of  Area  because  Area  is inherited from the abstract  ShapesClass : abstract class ShapesClass { abstract public int Area(); } class Square : ShapesClass { int side = 0; public Square( int n) { side = n; } // Area method is required to avoid // a compile-time error. public override int Area() { return side * side; } static void Main() { Square sq = new Square(12); Console.WriteLine( "Area of the square = {0}" , sq.Area()); } interface I { void M(); } abstract class C : I { public abstract void M(); } } // Output: Area of the square = 144 An  overrid...