2,157 Posted Topics

Member Avatar for james6754

Your sample code isn't a 'has a', it's a 'is a'. 'Has a' would be[code]class Student { BankAccount ba = new BankAccount(); }[/code] And I believe 'association' means 'has a'.

Member Avatar for Momerath
0
118
Member Avatar for skatamatic

It doesn't look like you ran tlbexp.exe on the dll to generate the COM interface. All you need to do is check the COM box in the project, assign a GUID to the assembly, then run tlbexp.exe on the resulting DLL. It will generate a *.tlb file that you register …

Member Avatar for skatamatic
0
479
Member Avatar for DaveTran

[code] public string Name { get { return name; } private set { name = value; } }[/code] And last I checked, serialization doesn't use set/get, it uses reflection. You'd also mark the variable name as the data member, not the property.

Member Avatar for Momerath
0
111
Member Avatar for Ancient Dragon

If you consider starting the trend of giving benefits to the rich by stealing from the middle class and poor a good thing; or starting the failed 'War on Drugs' that has increased our prison population to levels not even seen in countries run by dictators is a good thing; …

Member Avatar for e-papa
1
331
Member Avatar for DaveTran

You can't serialize a delegate. Since you can consider it a function pointer, what would it look like when serialized?

Member Avatar for DaveTran
0
164
Member Avatar for lee.j.baxter

Yes, B.dll will be using the same static property that the rest of your code uses, so it will have the same value everywhere.

Member Avatar for lee.j.baxter
0
171
Member Avatar for moone009

[code]cmd.CommandText = "UPDATE address" + "Set unitnumber =" + Addresstxt.Text + "WHERE streetnumber=148";[/code] Why are you building this out of parts of strings? What you are actually getting is: "UPDATE addressSet unitnumber = " + Addresstxt.Text + "WHERE streetnumber=148" Notice that you did not put a space between [B]address[/B] and …

Member Avatar for abelLazm
0
87
Member Avatar for WolfShield

[QUOTE=darkagn;1545760]I have never used the WebBrowser control, but my understanding of it was that it was simply a frame for viewing web pages. I believe you need to implement other controls such as a Back button and call the browser's GoBack function when the button is pressed.[/QUOTE] You would be …

Member Avatar for WolfShield
0
128
Member Avatar for xanawa

I'd say your username/password are not correct in line 21. I'd also not post them in a public forum.

Member Avatar for xanawa
0
105
Member Avatar for umesh314

[code]DIM myMatch as Match DIM userInput as String Dim searchString as String myMatch = Regex.Match(searchString, userInput & @"\w+");[/code]

Member Avatar for umesh314
0
127
Member Avatar for niketakapoor

You are trying to insert a record that has the same primary key as another record. How is your table defined?

Member Avatar for Mitja Bonca
0
91
Member Avatar for saqi1986

[code]for (int m = 0; m < cName.Length; m++) { Console.WriteLine("{0} {1} {2}", cName[m], cMarks[m], cGrade[m]); }[/code]

Member Avatar for saqi1986
0
98
Member Avatar for abhimanipal

The author of that code is just trying to return the last line of the ping output. They figured that mdev only occurs in the line they want data from, so that was a good thing to grep.

Member Avatar for Momerath
0
150
Member Avatar for DaveTran

You can't achieve your last question. It isn't possible to have an even number of rays that are evenly spaced, with one right in the center. You have to have an odd number to have one in the center.

Member Avatar for ddanbe
0
138
Member Avatar for Buffalo101

You'll need to perform a [URL="http://en.wikipedia.org/wiki/Lexical_analysis"]Lexical analysis[/URL] of the code. Your software will need to 'understand' that something like [icode]// This is a test of the sprintf() function ...[/icode] doesn't have a function call, isn't using . operators, etc. [URL="http://tldp.org/HOWTO/Lex-YACC-HOWTO-5.html"]This[/URL] might help.

Member Avatar for Buffalo101
0
108
Member Avatar for valter

Is this a managed or unmanaged DLL? What class is 'img'? Have you tried catching [URL="http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.externalexception%28v=VS.100%29.aspx"]ExternalException[/URL] instead of ArgumentException?

Member Avatar for valter
0
143
Member Avatar for rohitamitpathak

Does your string only contain the values 0-9 and the letter A? If so, you only need 4 bits to store that, which means you can pack 2 characters in each byte, halving the amount of storage required.

Member Avatar for rohitamitpathak
0
172
Member Avatar for LegitHugo

While there is a way to do it, it looks messy, so best* thing is to create an extension method! [code]namespace extensions; public static class MyStringExtensions { public static String ReadFrom(this string str, char start, char end) { string result = null; try { int s = str.IndexOf(start); int e …

Member Avatar for abelLazm
0
158
Member Avatar for vedro-compota

Yes, you have to tell it what type T is going to be by using the constructor.

Member Avatar for vedro-compota
0
138
Member Avatar for zachattack05

I have used them a bit. If you are running short executing threads, the overhead of the thread safe collections overwhelms the multi-thread gains.

Member Avatar for Momerath
0
41
Member Avatar for shyla
Member Avatar for Mark_48

[code]public void FileAppendToLine(String pathfile, Object[] array) { String[] lines = File.ReadAllLines(pathfile); if (lines.Length < array.Length) { Array.Resize(ref lines, array.Length); } for (int i = 0; i < array.Length; i++) {pathfile, lines) { if (String.IsNullOrEmpty(array[i])) { array[i] = lines[i].ToString(); } else { array[i] += "," + lines[i].ToString(); } } File.WriteAllLines(pathfile, lines); …

Member Avatar for Momerath
0
85
Member Avatar for abathurst

Do you have a stored procedure named 'Insert_PublicationsA'? That would be the first place I'd check.

Member Avatar for bill51
0
533
Member Avatar for bangor_boy

Your queuing is inconsistent. cycle 0 : queue job 1, do work on job 1. Job 1 not finished so requeued. cycle 1 : new job inserted in front of queue (job 2). Work job 2. Job 2 not finished requeue. cycle 2 : no new job. Do work on …

Member Avatar for Momerath
0
155
Member Avatar for Mark_48

[code]List<int> list1 = new List<int>(); List<int> list2 = new List<int>(); a & 0x8000 == 0 ? list1.Add(a) : list2.Add(a); b & 0x8000 == 0 ? list1.Add(b) : list2.Add(b);[/code] Checks if the high order bit is set.

Member Avatar for Mark_48
0
127
Member Avatar for techie1991

O(n) solution:[code] int value; for(int i = 0; i < myArray.Length; i++) { value ^= myArray[i]; } Console.WriteLine("{0} occurs only once", value); [/code] Works when all other numbers come in pairs. Make sure I get a good grade.

Member Avatar for youwill
0
104
Member Avatar for Nony2007

Are you trying to use LZ77, LZ78, LZW or Statistical Lempel Ziv?

Member Avatar for Nony2007
0
122
Member Avatar for reet_bahl
Member Avatar for shazzy99

Paths are normally giving with the \ character not /. Also which version of Access created the database?

Member Avatar for shazzy99
0
237
Member Avatar for willmotil

Create an interface and implement it in classes B and C. This interface should contain all the common methods. In class M create a List<T> of this interface and add the created classes B and C to this list. Since they implement the same interface, you don't care which class …

Member Avatar for Momerath
0
161
Member Avatar for TheTechWookie

Give them the free [URL="http://www.microsoft.com/downloads/en/details.aspx?familyid=048DC840-14E1-467D-8DCA-19D2A8FD7485&displaylang=en"]PowerPoint viewer[/URL] then fire them for wasting time viewing joke emails during work hours :)

Member Avatar for jwenting
0
359
Member Avatar for snehil_khanor

The click event has a sender object, use it to obtain the name. You'll have to attach to the click event of the controls.

Member Avatar for snehil_khanor
0
79
Member Avatar for anwars94
Member Avatar for Nfurman

[code]public static void GetStudents ... [/code] Your method returns nothing (void) yet your other code expects it to be returning something.

Member Avatar for Nfurman
0
102
Member Avatar for ashley11
Member Avatar for MackSwagga

[QUOTE=MackSwagga;1536539]I am trying to write a small program to keep track of my movie collection but I can't seem to get the streamwriter(I think thats what its called to work). Right now I am working on writing to a text file.[/quote] What is or is not happening? [quote]I had a …

Member Avatar for Momerath
0
170
Member Avatar for bhagawatshinde
Member Avatar for Skeldave

It's doing exactly what you told it to do. Notice the problem times cross the midnight boundary. You need to include the actual date (you know, day/month/year) in the comparison, not just the time.

Member Avatar for Skeldave
0
107
Member Avatar for hous3aholik

You have a lot of repetitive code in your case statements. Think of a way you can convert all this code into a method and just call it. Simplifies making changes to the way the selections are handled as you only need to make changes in one place. Changes like …

Member Avatar for hous3aholik
0
177
Member Avatar for Behseini
Member Avatar for Momerath
0
91
Member Avatar for zachattack05

It's possible to receive 0 bytes. The sender can send as much or as little data as they want.

Member Avatar for zachattack05
0
165
Member Avatar for emanfman

Create a new header file named "xxx.h". Put [icode]String ^ParseBBCode(String ^OriginalText);[/icode] in the new header file. Include it in the file where you call ParseBBCode.

Member Avatar for emanfman
0
317
Member Avatar for bunny07

One or more of M, N and/or sims is equal to zero. Or you have the amazing coincidence that the sum of each row is zero.

Member Avatar for bunny07
0
179
Member Avatar for xoron123
Member Avatar for Momerath
0
200
Member Avatar for Olivis

It's telling you that you misspelled "AddressBook" as "AdressBook". And since there is no "AdressBook" there is no object to work with, thus no rows or items.

Member Avatar for Olivis
0
231
Member Avatar for Dean_Grobler

[URL="http://msdn.microsoft.com/en-us/library/gg145045.aspx"].NET Framework Class Library[/URL]

Member Avatar for ddanbe
0
351
Member Avatar for xanawa

[code]private void comboBox1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { comboBox1.Items.Add(comboBox1.Text); e.Handled = true; } } [/code] You'll probably have issues with the dataset as databound controls don't like to be changed.

Member Avatar for xanawa
0
88
Member Avatar for CrazyProgrammer
Member Avatar for MARKAND911

[code]Stream s = Assembly.GetExecutingAssembly().GetManifestResourceStream("Namespace.XMLFileName.xml"); XmlDocument xdoc = new XmlDocument(); StreamReader reader = new StreamReader(s); xdoc.LoadXml(reader.ReadToEnd()); reader.Close();[/code] You'll have to put your own name in there

Member Avatar for MARKAND911
0
401
Member Avatar for niketakapoor

Post your actual code, not something you think is your code. Use [noparse][code] [/code][/noparse] around the code to properly format it. Indicate any lines that give you an error and what the error message actually is (again, don't paraphrase, cut/paste the error message).

Member Avatar for abelLazm
0
63

The End.