What’s the Difference between #WCF and #Web Services

WCF Service Windows Communication Foundation (WCF) is a framework for building service-oriented applications. Using WCF, you can send data as asynchronous messages from one service endpoint to another where you have to use WCF ?? A secure service to process business transactions. A service that supplies current data to others, such as a traffic report… Continue reading What’s the Difference between #WCF and #Web Services

difference between func and action delegates in #c# #programming

Action is a delegate (pointer) to a method, that takes zero, one or more input parameters, but does not return anything. Func is a delegate (pointer) to a method, that takes zero, one or more input parameters, and returns a value (or reference). static void PrintText(string message) { Console.WriteLine(Message); } static double Calculate(int i) {… Continue reading difference between func and action delegates in #c# #programming

How To Download #Google Search History?

Here is how to download your #Google search history, take a look: Step 1. you need to sign in google account then head on over to Google Web History. Now Click on the gear button and click on download. Step 2. Now Google will display you a warning as your Google search history may have some sensitive information.… Continue reading How To Download #Google Search History?

what does REST Stand For ?

REST  is (REpresentational State Transfer) its an architecture style and an approach to communicate often used in the development of web services  it  decoupled architecture and lightweight communication  between the producer and the consumer wich make  REST more preferable than  SOAP because   does not leverage as much bandwidth so   it s popular building style for… Continue reading what does REST Stand For ?

String format extension method

Snippet ******* extension method creation ****** public static class Extensions { public static string FormatWith(this string s, List<string>  args)         {             string result = “”;             foreach (var item in args)             { result += string.Format(s, item);  }             return result;         } } ************extension method use ***************** List<string> SourceList= new List<string> { “item 1”, “item 2”, “item 3”, “item 4” };  string TargetString= “<p>Current Item is :{0}</p>”.FormatWith(ss);

How to log Exceptions and its inner exception using c#

public static void Log_Errors(Exception Exception)  { StringBuilder sr = new StringBuilder(); do { sr.Append(“Excception Type :” + Environment.NewLine); sr.Append(Environment.NewLine + Exception.GetType().Name); sr.Append(“\n \n Excception Message :\n” + Exception.Message + Environment.NewLine); sr.Append(“Stack Trace :” + Environment.NewLine); sr.Append(“QueryString \n \n :” + HttpContext.Current.Request.QueryString); Exception = Exception.InnerException; } while (Exception != null); string sourceName = “LogSourceName”; if (!EventLog.SourceExists(sourceName)) { EventLog.CreateEventSource(sourceName, “LogName”); } EventLog log = new EventLog(“LogName”); log.Source = sourceName; log.WriteEntry(sr.ToString(), EventLogEntryType.Error);   }