Carefull about object.ToString()[i]: the output is char type. If you Convert that value to int, you will get chars representation in int. To get the value of the char, the simple way is to convert it to string:
- .ToString()[i].ToString();
Carefull about object.ToString()[i]: the output is char type. If you Convert that value to int, you will get chars representation in int. To get the value of the char, the simple way is to convert it to string:
crDaily1.SetDataSource((DataTable)dtDaily); crDaily1.SetParameterValue("pPeriod", title);
private void FormReportDaily_Shown(object sender, EventArgs e)sometimes the dummy data that appears in "Main Report Preview" is shown at runtime. I really don't know the reason?!.
crDaily1.SetDataSource((DataTable)dtDaily); crDaily1.SetParameterValue("pPeriod", title);
public FormReportDaily()
dynamic Student = new ExpandoObject(); Student.ID = 1; Student.Name = "John";Student.Grade = 10;
Student.Addess = new ExpandoObject(); Student.Addess.City = "London"; Student.Addess.Country = "UK"; Student.Addess.StreetNo = 123456;Dynamically binding an Event
Student.Click += new EventHandler(SampleHandler); private void SampleHandler(object sender, EventArgs e) { //throw new NotImplementedException(); }Pass parameter as dynamic.
public void Write(dynamic Student) { //do stuff }
// Comment //create XML
XmlDocument doc = new XmlDocument();
//header
XmlDeclaration decl = doc.CreateXmlDeclaration("1.0", "UTF-8", null);
doc.AppendChild(decl);
//
doc.Schemas.Add("test:schema:v1", "http://sample.com/schema.xsd");
XmlElement decElem = doc.CreateElement("root");
XmlAttribute attr = doc.CreateAttribute("xsi", "schemaLocation", "http://www.w3.org/2001/XMLSchema-instance");
attr.Value = "test:schema:v1 schema.xsd";
decElem .Attributes.Append(attr);
decElem .SetAttribute("xmlns", "decElem");
doc.AppendChild(docElem);