You must first install geoserver and publish your local data, or use its own data.
Install Google Earth, create a project, and add the reference earthlib to Google Earth com api in reference. The Code is as follows:
Private void someevent (Object sender, eventargs E)
{
String uri = "http: // localhost: 8888/geoserver/WMS? BBox =-130,24,-66,50 & styles = Population & format = kml & request = getmap & layers = Topp: States & width = 550 & Height = 250 & SRS = epsg: 4326 ";
System. net. webrequest wR = system. net. webrequest. Create (URI );
Iapplicationge wmsget = appge as iapplicationge;
Using (system. net. webresponse response = Wr. getresponse ())
{
Encoding encode = system. Text. encoding. getencoding ("UTF-8 ");
Streamreader readstream = new streamreader (response. getresponsestream (), encode );
String kml = readstream. readtoend ();
Wmsget. loadkmldata (ref kml );
}
}