2,157 Posted Topics

Member Avatar for XEN0

No, you can't use it like a type, but you can use the Typeof(field) as a type. Not sure what you are really asking here, could you explain more what you are trying to do?

Member Avatar for XEN0
0
185
Member Avatar for sagngh8

1) Add both assemblies to your project. 2) Right click the first assembly and select Properties 3) Change the Aliases field from 'global' to something else, like 'Version4000' 4) Do the same with the second assembly, but with a different alias, 'Version4030' 5) add these lines to the top of …

Member Avatar for Momerath
0
434
Member Avatar for Dòc618

[URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.listbox.selecteditem.aspx"]ListBox.SelectedItem[/URL]

Member Avatar for Momerath
0
112
Member Avatar for DavidKroukamp

You can create your GUI 'by hand' if you so desire. Open one of your GUI projects and take a look at the Form1.Designer.cs file (for example). That's the stuff you'll have to do to create a form and add controls to it. The Program.cs shows how you'd start up …

Member Avatar for DavidKroukamp
0
341
Member Avatar for digiguy

ASP.NET is a web framework, not a programming language. So you don't program in ASP.NET. C# isn't a web based language. It's just a normal OO language that has a framework (ASP.NET) for writing web based applications.

Member Avatar for skatamatic
0
145
Member Avatar for notuserfriendly

Take a look at [URL="http://msdn.microsoft.com/en-us/library/8he88b63.aspx"]DirectoryInfo.GetFiles[/URL], and the [URL="http://msdn.microsoft.com/en-us/library/system.io.file.aspx"]File[/URL] class. Depending on the size of the files you'll want to look at ReadAllLines and WriteAllLines.

Member Avatar for thines01
0
304
Member Avatar for saneeha.nust

The OLE DB.NET Framework Data Provider uses positional parameters that are marked with a question mark (?) instead of named parameters. So you'll have to replace your @... with just ? and add the parameters in the order that they should appear. Look at the Remarks on [URL="http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbparameter.aspx"]MSDN[/URL]

Member Avatar for saneeha.nust
0
171
Member Avatar for dwarvenassassin

You are reading the database in two different ways. In the VB code, you fetch the entire table in a single read, then loop through the records. In the C# code, you are fetching single rows at a time, so you are making multiple calls to the DB.

Member Avatar for Momerath
0
195
Member Avatar for itsvineethpv
Member Avatar for Ketsuekiame
0
321
Member Avatar for ipodtrip

Here is the code you need to look at:[code]double shipping_cost, distance,rate; distance = double.Parse(textBox2.Text); if (radioButton1.Checked) switch (listBox1.SelectedIndex) { case 0: rate = 1.0; break; case 1: rate = 2.0; break; case 2: rate = 2.5; break; case 4: rate = 3.0; break; } shipping_cost = distance * rate; [/code]The …

Member Avatar for Momerath
0
240
Member Avatar for VasquezPL

[QUOTE=VasquezPL;1763074]I dont see much difference between both of them :/[/QUOTE] Then you need to go back and learn what an object is. And List<T> is for dynamic 'arrays'

Member Avatar for VasquezPL
0
292
Member Avatar for zachattack05

Mark them private. Only the object will be able to access them then. Other than that, there isn't anything you can do. I do wonder why you are so concerned that someone will call them.

Member Avatar for zachattack05
0
158
Member Avatar for dalia_24

To shift rows you do this: Take row 1 and copy it to row 0. Take row 2 and copy it to row 1. Take row 3 and copy it to row 2. .... take row n-1 and copy it to row n-2. Take row n and copy it to …

Member Avatar for thines01
0
111
Member Avatar for saneeha.nust

Go to this page [url]http://sourceforge.net/projects/sharppcap/[/url] Click on the Support link. Follow the instructions.

Member Avatar for skatamatic
0
564
Member Avatar for codechrysalis
Member Avatar for codechrysalis
0
191
Member Avatar for kurtzky123

I'd suspect it has something to do with the fact that < is the start of an HTML statement. Try convert it to &lt;

Member Avatar for ChrisHunter
0
130
Member Avatar for Walther1366
Member Avatar for Walther1366
0
180
Member Avatar for varunme

[code]using System; using System.Collections.Generic; namespace Testing { class Program { static void Main(string[] args) { int a = 11111111; List<int> index = new List<int>(); int pos = 0; while (a > 0) { if ((a & 1) == 1) { index.Add(pos); } a /= 2; pos++; } foreach (int i …

Member Avatar for ddanbe
0
195
Member Avatar for dilansankalpa

Here is a generic split method that takes a character and an integer (n) and splits your string on every nth occurance of the character. Included is a little Main routine that tests it. [code]using System; using System.Collections.Generic; using System.Text; using System.Text.RegularExpressions; namespace Testing { class Program { static void …

Member Avatar for thines01
0
253
Member Avatar for barriegrant1

split the parts in your Linq statement instead of accepting the date as a whole value: [code]select new { c.content_Date.Day, c.content_Date.Month, c.content_Date.Year, c.content_Intro, c.content_Main, c.content_Title };[/code]

Member Avatar for barriegrant1
0
179
Member Avatar for juce

Now that everyone has gone off track to your question :) You'll need to parse out the values from the string (as ints, strings, characters, whatever). You can then use Linq to get the union of the two sets, for example [code]String string1 = "1,2,3"; String string2 = "3,4,5"; String[] …

Member Avatar for thines01
0
295
Member Avatar for belama

During an update, SQL Server locks the resources in question with an exclusive lock, so they can't be read. From the documentation on transactions (italics mine): "BEGIN TRANSACTION starts a local transaction for the connection issuing the statement. Depending on the current transaction isolation level settings, [I]many resources acquired to …

Member Avatar for Momerath
0
403
Member Avatar for zachattack05

Your binding source should implement the [URL="http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged.aspx"]INotifyPropertyChanged[/URL] interface. Then you'll only need to subscribe to one event.

Member Avatar for zachattack05
0
524
Member Avatar for wissam.ashkar

First, why are you calling the Convert.ToDouble when you are getting it as a double? It's not needed. Second, if it says there is no data, there is no data. Put a breakpoint on the line and inspect the values and see if it is what you wanted.

Member Avatar for mani-hellboy
0
202
Member Avatar for Skeldave

System.Data.Linq.Table is a generic type, thus you can't create an object of this type. You must provide the 'parameter' so the compiler can complete the generic class and make it a specific class. For example, you can't have a List<>, you provide a type with it (List<int>) and the compiler …

Member Avatar for ddanbe
0
150
Member Avatar for chandnigandhi

[url]http://www.codeproject.com/Articles/18520/Vista-Core-Audio-API-Master-Volume-Control[/url]

Member Avatar for Momerath
0
68
Member Avatar for kolibrizas

Triggers is how you would do this. If you are using SQL Server it is possible to write modules in C# that can be executed by the server. It would be easier just to have the client poll the DB for info. I do have to ask, though, why save …

Member Avatar for kolibrizas
0
280
Member Avatar for smarty_t2

Only one thread in your program can actually interact with the GUI, and that's the problem you are seeing. If your child forms have heavy processing to do, you can spawn threads to handle that processing and when the thread is done, update the GUI.

Member Avatar for Momerath
0
282
Member Avatar for apanimesh061

Do you know how to program in C#? Do you know how to use a database? Do you know how to create an audio 'fingerprint'?

Member Avatar for shalshal
0
153
Member Avatar for sudheer2250

I can think of two reasons that you get these results: 1) The module isn't being loaded in 4.0 as the compiler is 'smarter' and it doesn't need to load it. 2) The module hasn't been loaded *yet*. The system is still in the act of loading modules when you …

Member Avatar for sudheer2250
0
365
Member Avatar for dunktap

In line 24 of your second code block you are adding the event handler 'textBlock1_MouseEnter' to the MouseEnter event, but you don't actually have a method defined with that name anywhere that I can see, thus the error you are getting. Create the methods.

Member Avatar for Momerath
0
414
Member Avatar for smarty_t2

You can also create your own certificate for testing purposes (or if the application is only used by your company). Example of doing this can be found [URL="http://en.csharp-online.net/Deploying_Windows_Applications%E2%80%94Sign_the_ClickOnce_Manifests"]here[/URL].

Member Avatar for smarty_t2
0
157
Member Avatar for jackbauer24

[B]return[/B] can also be used as flow control in methods, even void methods [code]public void TestMethod() { if (someStatus == true) return; DoOtherStuffHere(); }[/code] You use this to remove decision making from the calling method and placing it within the called method. This is useful when the information you need …

Member Avatar for EBS.VivekGupta
0
196
Member Avatar for SindhujaNagaraj
Member Avatar for Tellalca

Just to clarify that, the + is the unary +, just like there is the unary - (for example, x = x + -1, x = x + +1). It's rarely used, as in I've never seen anyone use it :)

Member Avatar for Momerath
0
210
Member Avatar for kamilacbe

[url]http://openwinforms.com/[/url] [url]http://www.viblend.com/products/net/windows-forms/controls/free-winforms-controls.aspx[/url] [url]http://dotnetkicks.com/winforms/Ascend_NET_Nice_and_FREE_WinForms_Controls[/url] Just do a search for free winform controls.

Member Avatar for kamilacbe
0
139
Member Avatar for zachattack05

[icode]SELECT DISTINCT a.ID FROM Contacts a, AccountsContacts b WHERE a.ID = b.ContactID AND b.AccountID NOT IN (<account id here>);[/icode] Should give you a list of all the contacts that are not linked to the specified account(s).

Member Avatar for zachattack05
0
2K
Member Avatar for lxXTaCoXxl

I'm guessing that in his game he's fixed the bugs, but he hasn't posted the fixed code here.

Member Avatar for lxXTaCoXxl
-1
248
Member Avatar for abelLazm

Problems with this code: It makes use of values that aren't declared or passed as values (the various textbox values). There is no error checking at all. It has bugs in it. I'll let you test your debugging skills. Just a quick glance over the code shows at least seven.

Member Avatar for skatamatic
0
874
Member Avatar for sudheer2250

What do you mean by compare? Execution time? That they do the same thing? That they have the same code?

Member Avatar for Momerath
0
61
Member Avatar for govnah
Member Avatar for Momerath
0
2K
Member Avatar for sachintha81

The problem is caused by how the system looks for DLL files. It checks the location where the exe was started, the path, and the windows system directory. Since your DLL isn't located in any of these places, it can't find it. But you can register the DLL with the …

Member Avatar for sachintha81
0
3K
Member Avatar for lxXTaCoXxl

Since the DateTime is nullable, you should check if it is null before your TotalLife calculation, then cast it into a DateTime.

Member Avatar for lxXTaCoXxl
0
1K
Member Avatar for Jigs28

Use the built in function StrComp, as in "SELECT StrComp('hello', 'Hello', 0)". It will return 0 if they are the same, otherwise -1 or 1.

Member Avatar for Momerath
0
1K
Member Avatar for saneeha.nust

Each user (and machine) has a key that is used by the API. The same key is used for anything that uses the Data Protection API. Not sure what private key files you are talking about.

Member Avatar for saneeha.nust
0
101
Member Avatar for Dorayaki

You'll need to send it, just like you are the file itself. Just send it first, then send the file.

Member Avatar for Dorayaki
0
699
Member Avatar for daitkarsachin

Check out the [URL="http://msdn.microsoft.com/en-us/library/system.speech.recognition.aspx"]System.Speech.Recognition[/URL] namespace. I used the API to speak xome words a long time ago and it seemed easy to use.

Member Avatar for manjumysore.k
0
245
Member Avatar for saneeha.nust

This structure would be defined as [code][System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public struct CRYPT_ATTR_BLOB { /// DWORD->unsigned int public uint cbData; /// BYTE* public System.IntPtr pbData; }[/code] in C#.

Member Avatar for Momerath
0
110
Member Avatar for ChaseRLewis
Member Avatar for Momerath
0
193
Member Avatar for Azmah

[QUOTE=Ancient Dragon;1570850]Yes, it would be if it were written in C or C++ (and several other computer languages). But this is a math quiz, not a programming quiz. I don't recall ever seeing * meaning multiply until I started learning programming.[/QUOTE] I've seen #x used as a base indicator, so …

Member Avatar for BDove
0
2K

The End.