RcBuilder@walla.com
call centre: 054-5614020

Html comment contains the runat server phrase cause an exception

Posted by: RcBuilder  /   Category: BUGS / Extensions / HTML   /   No Comments
08
Sep
2014

Bug: the phrase RUNAT SERVER cause an exception even when its located within html remark/comment problem: html remark with the 'RUNAT SERVER' phrase cause an exception the exception caused by the .net compiler and not the explorer mechanism example: <body> <form id="form1" runat="server"> <div> <!-- RUNAT SERVER --> </div> </form> </body> fix: remove or change the.

Read more

unix date ToUNIXTime

Posted by: RcBuilder  /   Category: DateTime / Extensions / SOURCE CODE   /   1 Comment
24
Jun
2014

unix date - ToUNIXTime extension unix time represents the number of seconds since 01/01/1970 double ToUNIXTime internal static class Extensions { public static DateTime ToUNIXTime(this double me) { // UNIX Time based on the number of seconds from 01.01.1970 return new DateTime(1970, 1, 1).AddSeconds(me); } DateTime ToUNIXTime public static double ToUNIXTime(this DateTime me) { // UNIX Time based on the number of seconds from 01.01.1970 TimeSpan ts = me - new DateTime(1970,.

Read more

string extension ToXML

Posted by: RcBuilder  /   Category: Extensions / SOURCE CODE / XML   /   No Comments
24
Jun
2014

string extension - ToXML public static class Extension { public static XDocument ToXML(this string me) { try { return XDocument.Parse(me); } catch(Exception ex) { return new XDocument(new XElement("ERROR", ex.Message)); } } } USING var XML =.

Read more

implicit C#

Posted by: RcBuilder  /   Category: Converters / Extensions / implicit / SOURCE CODE   /   No Comments
29
May
2014

implicit C# structure: public static implicit operator Class3(Class1 c); // implicit Convert Class1 to Class3 public static implicit operator Class3(string s); // implicit Convert string to Class3 public static implicit operator string(Class3 c); // implicit class3 to string ... ... example: public class ClassA { public string FName { private set; get; } public string LName { private set; get; } public byte Age { private set;.

Read more

implicit cast to return a single instance object

Posted by: RcBuilder  /   Category: Converters / Extensions / implicit / Reference Types / SOURCE CODE   /   No Comments
29
May
2014

using implicit cast to return a single instance object /* the abillity to return a single instance for multiple objects using implicit cast we defined 2 classes (class1 and class2) and we define 2 services (service1 and service2) each service DoWork method should return a different object type (service1 return class1 and service2 return class2) demand: we want to share it.

Read more

ToParams – string extension

Posted by: RcBuilder  /   Category: Dictionary / Extensions / Linq / List / Reference Types / SOURCE CODE   /   1 Comment
28
May
2014

ToParams - string extension ResponseParams public class ResponseParams { private Dictionary<string, string> _prms = null; public ResponseParams() { _prms = new Dictionary<string, string>(); } public ResponseParams(IEnumerable<KeyValuePair<string, string>> prms) : this() { foreach (var p in prms) _prms = p.Value; } public string this { get { return _prms; } set { if (!_prms.ContainsKey(Name)) // new _prms.Add(Name, value); else // update _prms = value; } } } Extensions internal static class Extensions { public static ResponseParams ToParams(this string me){ var res = from.

Read more
  • פיתוח מערכות
  • פתרונות טכנולוגים
  • קידום אתרים
  • בניית אתרים