c# Programming Glossary: reader.read
jQuery AutoComplete multiple Output http://stackoverflow.com/questions/12855617/jquery-autocomplete-multiple-output using SqlDataReader reader command.ExecuteReader while reader.Read cmpList.Add new Employee Name reader Value1 .ToString Title.. using SqlDataReader reader command.ExecuteReader while reader.Read cmpList.Add new Employee Name reader Value2 .ToString Title..
XML serialization of interface property http://stackoverflow.com/questions/1333864/xml-serialization-of-interface-property a type attribute string type reader.GetAttribute type reader.Read consume the value if type null return leave T at default value.. type this.Value T serializer.Deserialize reader reader.ReadEndElement public XmlSchema GetSchema return null Using this..
Using CDATA with WCF REST starter kits http://stackoverflow.com/questions/1374062/using-cdata-with-wcf-rest-starter-kits XmlReader reader if reader.IsEmptyElement Value else reader.Read switch reader.NodeType case XmlNodeType.EndElement Value empty.. break case XmlNodeType.Text case XmlNodeType.CDATA Value reader.ReadContentAsString break default throw new InvalidOperationException..
A C# equivalent of C's fread file i/o http://stackoverflow.com/questions/1935851/a-c-sharp-equivalent-of-cs-fread-file-i-o
How to deal with XML in C# http://stackoverflow.com/questions/220867/how-to-deal-with-xml-in-c-sharp XmlReader reader XmlReader.Create pathToXml settings while reader.Read private void settings_ValidationEventHandler object sender ValidationEventArgs..
Reading Xml with XmlReader in C# http://stackoverflow.com/questions/2441673/reading-xml-with-xmlreader-in-c-sharp XmlReader.Create inputUrl reader.MoveToContent while reader.Read if reader.NodeType XmlNodeType.Element if reader.Name elementName.. problem. using XmlReader reader XmlReader.Create inputUrl reader.ReadStartElement theRootElement while reader.Name TheNodeIWant XElement.. TheNodeIWant XElement el XElement XNode.ReadFrom reader reader.ReadEndElement This takes care of a read too far problem because..
SQL Query slow in .NET application but instantaneous in SQL Server Management Studio http://stackoverflow.com/questions/2736638/sql-query-slow-in-net-application-but-instantaneous-in-sql-server-management-st And then... reader cmd.ExecuteReader if reader.Read double value double reader.GetValue 0 if System.Double.IsNaN..
Proper way to implement IXmlSerializable? http://stackoverflow.com/questions/279534/proper-way-to-implement-ixmlserializable _color Color.FromArgb Int32.Parse reader Color if reader.ReadToDescendant MyEvent while reader.MoveToContent XmlNodeType.Element.. evt new MyEvent evt.ReadXml reader _events.Add evt reader.Read public void WriteXml XmlWriter writer writer.WriteAttributeString.. Start _stop DateTime.FromBinary Int64.Parse reader Stop reader.Read public void WriteXml XmlWriter writer writer.WriteAttributeString..
deserializing JSON to .net object using NewtonSoft (or linq to json maybe?) http://stackoverflow.com/questions/4749639/deserializing-json-to-net-object-using-newtonsoft-or-linq-to-json-maybe Newtonsoft.Json.JsonConvert.DeserializeObject List string reader.Read .ToString foreach string item in list Console.WriteLine item.. item in list Console.WriteLine item Console.WriteLine reader.ReadLine stream.Close that JsonConvert line is just the most recent.. jObject Newtonsoft.Json.Linq.JObject.Parse reader.ReadLine instead of WriteLine 2 or 3 lines of code here using WebClient..
How do I select an aggregate object efficiently using Dapper? http://stackoverflow.com/questions/6146918/how-do-i-select-an-aggregate-object-efficiently-using-dapper Action TFirst IEnumerable TSecond addChildren var first reader.Read TFirst .ToList var childMap reader .Read TSecond .GroupBy s..
.NET XML serialization gotchas? [closed] http://stackoverflow.com/questions/67959/net-xml-serialization-gotchas typeof TValue bool wasEmpty reader.IsEmptyElement reader.Read if wasEmpty return while reader.NodeType System.Xml.XmlNodeType.EndElement.. while reader.NodeType System.Xml.XmlNodeType.EndElement reader.ReadStartElement item reader.ReadStartElement key TKey key TKey.. reader.ReadStartElement item reader.ReadStartElement key TKey key TKey keySerializer.Deserialize reader..
SQLDataReader dispose? http://stackoverflow.com/questions/744051/sqldatareader-dispose cmd.ExecuteReader connection.Open if reader null while reader.Read do something reader.Close too easy to forget reader.Dispose.. reader cmd.ExecuteReader if reader null while reader.Read do something reader closed and disposed up here command disposed..
Validating an XML against referenced XSD in C# http://stackoverflow.com/questions/751511/validating-an-xml-against-referenced-xsd-in-c-sharp inlineSchema.xml settings Parse the file. while reader.Read Display any warnings or errors. private static void ValidationCallBack..
Cannot deserialize JSON array into type - Json.NET http://stackoverflow.com/questions/9452901/cannot-deserialize-json-array-into-type-json-net objectType object existingValue JsonSerializer serializer reader.Read start array reader.Read start object JObject obj JObject serializer.Deserialize.. JsonSerializer serializer reader.Read start array reader.Read start object JObject obj JObject serializer.Deserialize reader.. .Value model.Total Convert.ToInt32 JValue obj total .Value reader.Read end object model.Countries serializer.Deserialize List Country..
|