Blog Stats
  • Posts - 42
  • Articles - 0
  • Comments - 98
  • Trackbacks - 34

 

September 2005 Entries

AJAX Dictionary

This is one more super duper example for the power of AJAX (Asynchronus Javascript And Xml). We had GMail, Google Suggest, Google Groups, GMaps etc already showing the power of it. I had already tried it out for a Pubs database using C#, just like Google suggest. But the dictionary idea is real good. Check it out: http://www.objectgraph.com/... How does it work: http://www.objectgraph.com/...how.html...

strObject1.Equals(strObject2) v/s strObject1 == strObject2

This apparently confusing question has the following answer. Even though a string is a reference type, it behaves as a value type. when you assign a value to a string it does not change the undelying object reference, it creates a new one and assigns the string pointer to the new string object. string strObject1 = "A" string strObject2 = "B" string strObject3 = "A" At this point strObject1 and strObject3 point to the same point in memory. strObject3="B" now strObject1 has been unaffected and points...

Dynamically loading a C# serviced component

Type type = Type.GetTypeFromProgID( "ComponentName.1", "localhost", true ); // or, using a guid.... //Type type = Type.GetTypeFromCLSID( new Guid( "{AA77B197- A85D-445E-88C9-2A564D756220}" ), "remoteserver", false ); m_Component = (IMyInterface) Activator.CreateInstance( type ); // IMyInterface is the interface that is extended by the serviced component on the server side.//Now call any method on the component.m_Component.Compo...

Interface from a different assembly

An interface IMyInterface in an assembly A should have “public” access modifier, if it needs to be accessed from assembly B. i.e Assembly B refereneces A, and accesses interface IMyInterface

 

 

Copyright © Vinayak