Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
2
Posts with Upvotes
2
Upvoting Members
2
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
Ranked #3K
~10K People Reached
Favorite Forums

20 Posted Topics

Member Avatar for Momerath

It is working as expected because structs are value types not reference types. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Sample { class Program { static void Main(string[] args) { MyStruct a; a.a = 1; a.b = 2; MyStruct b = a; // This makes a copy of …

Member Avatar for f.khansaheb
3
153
Member Avatar for tboctavan

Your return type is void. If you change the method signature to return int, you should be good to go.

Member Avatar for tboctavan
0
118
Member Avatar for anisha.silva

You don't need to explictly call a constructor for a string. Infact, there is not a constructor for String that takes a String as an argument. All you need to do is: `public static string POISON_PILL = "AAA";`

Member Avatar for Michael27
0
997
Member Avatar for infogirl

Well, the first problem I think is that you are trying to fill your dataset from the adapter before you open a connection to the database. Try flipping lines 9 and 11.

Member Avatar for PatSharbaugh
0
272
Member Avatar for PatSharbaugh

Earlier today, I was very bored. I set out to see if I could write a program that would solve 24 problems (see [Wikipedia](http://en.wikipedia.org/wiki/24_Game)). Now, I was bored, mind you, and I thought, "Can I solve it in 1 line of code?" NOTE: I do not recomend this approach, it …

Member Avatar for nerdwerd
0
184
Member Avatar for Member #956681
Member Avatar for tudorH

Put the ?wsdl after the .asmx of your webservice. If you get a big xml document, you're on the right track.

Member Avatar for advisor999
0
253
Member Avatar for snkar

Hi Snkar, By Builder do you mean Constructor? Are you looking for the objects recieved from the webservice to go to the webservice and get there children on creation instead of what ever is calling the web service retreieving each of them and adding them to there parents?

Member Avatar for snkar
0
226
Member Avatar for c#_fem
Member Avatar for PatSharbaugh
0
74
Member Avatar for Cameronsmith63
Member Avatar for celop

Hi Celop, Take a look at the project I attached to this post, it should get you in the right direction. First, I created a lattice object class that had a list of integers and two properties for even or odd: using System.Collections.Generic; namespace ReadDataFromFile { public class LatticeObject { …

Member Avatar for celop
0
115
Member Avatar for lena20

When you are setting the value of the attribute, you don't have to worry about the xml escape sequence, just the c# escape sequence \". Try the following code: var doc = new XmlDocument(); var rootElement = doc.CreateElement("root"); doc.AppendChild(rootElement); var elementWithAttribute = doc.CreateElement("child"); var valueAttribute = doc.CreateAttribute("value"); valueAttribute.Value = "&\"Hello …

Member Avatar for lena20
0
180
Member Avatar for abathurst

Hi Abathurst, The CData section is able to be referenced as a child node of element3. Specifically it is a XmlCDataSection. using System; using System.Xml; namespace ExtractingCData { class Program { static void Main(string[] args) { var xmlAsString = "<root><element3><![CDATA[Information that I need to extract]]></element3></root>"; var xmlDoc = new XmlDocument(); …

Member Avatar for PatSharbaugh
0
286
Member Avatar for nicewave

The reason is because tmpString is less than 710 characters so it can not get a sub string with a length of 709 characters starting with the first one. Try this: string tmpStr = "This is a test."; if (tmpStr.Length < 709) { //MessageBox.Show("The string is too short."); } else …

Member Avatar for Momerath
0
281
Member Avatar for Angel78

What you might want to consider doing is moving the logic of dice rolling into another class and keep the form as just a manipulator of that class. So, you could have a DiceRollLogger class that has a method RollEm(), a method ClearHistory(), and a property taht allows you to …

Member Avatar for PatSharbaugh
0
1K
Member Avatar for suneye
Member Avatar for PatSharbaugh
0
76
Member Avatar for nicewave

Hi Nicewave! What you are going to want to do is listen for the CellMouseEnter and CellMouseLeave events. This way, you can set the rows to the appropriate styles on enter and leave. I have attached a sample project that shows how this can be done. using System.Data; using System.Drawing; …

Member Avatar for PatSharbaugh
0
3K
Member Avatar for Behseini

You could listen to the lost focus event. `txtCustomColo.LostFocus += new EventHandler(txtCustomColo_LostFocus);` And then implement the method: void txtCustomColo_LostFocus(object sender, EventArgs e) { // Add code here } That's it.

Member Avatar for PatSharbaugh
0
122
Member Avatar for PatSharbaugh

Earlier today, a colleague of mine came to me with a question. He was writing Unit Tests for a serialization utility and needed to compare the generated xml with the hand written xml file which was the expected result. By eye inspection, the xml seemed to be the same, but …

Member Avatar for PatSharbaugh
0
2K
Member Avatar for eoop.org

The End.