Posts

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...

DllImportAttribute Class in C#

Indicates that the attributed method is exposed by an unmanaged dynamic-link library (DLL) as a static entry point. Namespace:    System.Runtime.InteropServices Assembly:    mscorlib  (in mscorlib.dll) You can apply this attribute to methods. The  DllImportAttribute  attribute provides the information needed to call a function exported from an unmanaged DLL. As a minimum requirement, you must supply the name of the DLL containing the entry point. You apply this attribute directly to C# and C++ method definitions; however, the Visual Basic compiler emits this attribute when you use the  Declare  statement. For complex method definitions that include  BestFitMapping ,  CallingConvention ,  ExactSpelling ,  PreserveSig ,  SetLastError , (MSDN LINK)  or   ThrowOnUnmappableChar   (MSDN LINK)   fields, you apply this attribute directly to Visual Basic method definitions. Note  ...

Extern Keyword in C#

The  extern  modifier is used to declare a method that is implemented externally. A common use of the  extern  modifier is with the  DllImport  attribute when you are using Interop services to call into unmanaged code. In this case, the method must also be declared as  static , as shown in the following example: [DllImport("avifil32.dll")] private static extern void AVIFileInit(); NOTE: The  extern  keyword can also define an external assembly alias, which makes it possible to reference different versions of the same component from within a single assembly. For more information, see  extern alias (C# Reference) . It is an error to use the  abstract (C# Reference)  (MSDN LINK)  and  extern  modifiers together to modify the same member. Using the  extern  modifier means that the method is implemented outside the C# code, whereas using the  abstract  modifier means that the method impleme...

Yield in C#

The  yield  keyword signals to the compiler that the method in which it appears is an iterator block. The compiler generates a class to implement the behavior that is expressed in the iterator block. In the iterator block, the  yield  keyword is used together with the  return  keyword to provide a value to the enumerator object. This is the value that is returned, for example, in each loop of a  foreach  statement. The  yield  keyword is also used with  break  to signal the end of iteration. For more information about iterators, see  Iterators (C# Programming Guide) .(MSDN LINK) The following example shows the two forms of the yield statement. public static IEnumerable Power( int number, int exponent) { int counter = 0; int result = 1; while (counter++ < exponent) { result = result * number; yield return result; } }