|
Assuming you actually meant:
int i=0;
Console.WriteLine(i);
int i2=new Int32();
Console.WriteLine(i2);
Well, if you were doing it alot then you'd incur a boxing/unboxing cost of creating an refernce representation of a value variable.
And future developer's looking at your code will think you're a bit kooky.
|
|
|
|
|
From database i m fetching data i want to display Data in hyperlink (Windows form application)
the code is below
string conn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path + "\\db1.mdb";
OleDbConnection con = new OleDbConnection(conn);
OleDbCommand cmd = con.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "Select * from Player where CountryID=" + index;
OleDbDataAdapter da = new OleDbDataAdapter(cmd);
DataSet ds = new DataSet("Player");
OleDbCommandBuilder oldbcbr = new OleDbCommandBuilder(da);
da.Fill(ds, "Player");
dataGridView2.DataSource = ds;
DataTable dt = new DataTable();
da.Fill(dt);
dataGridView2.DataSource = dt;
try
{
for (int i = 0; i <= ds.Tables[0].Rows.Count - 1; i++)
{
MessageBox.Show(ds.Tables[0].Rows[i].ItemArray[0] + " -- " + ds.Tables[0].Rows[i].ItemArray[1]);
}
}
catch (Exception ex)
{
MessageBox.Show("Can not open connection ! ");
}
Pls tell me how to display data as hyperlink in gridview or using Some other Control
|
|
|
|
|
This might be of some assistance to you.
Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
I wrote a sample C# code for printing. I want to print multiple copies of the same document, where the num of copies are to be specified by user.I used below code:
printDocument1.PrinterSettings.Copies = 5;
But doesn't work, Please help me.
Best Regards,
Reza Shojaee
|
|
|
|
|
Reza Shojaee wrote: But doesn't work, Please help me.
Have you checked the MaximumCopies [^] property? Not all printers support printing multiple copies according to the documentation[^];
MSDN states: Not all printers support printing multiple copes. You can use the MaximumCopies property to determine the maximum number of copies the printer supports. If the number of copies is set higher than the maximum copies supported by the printer, only the maximum number of copies will be printed, and no exception will occur.
I are Troll
|
|
|
|
|
|
Another cross-poster. Stop it. Post your question once and once only and then wait for the answer. It is extremely unlikely that someone will read your question a nano-second after you post it and then provide the answer you require. Be patient. Now, do yourself a big favor and delete all the other posts so this is only here once.
me, me, me
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
|
|
|
|
|
Hi All,
I am looking forward to write an application that will monitor my outlook and when ever i receive an email from a particular address say (codeproject@codeproject.com) will move this email to a particular location like copy the content of the email to a SQL database column.
The options i thought was to write an add in for out look.
But i think there will be easier solutions.
Can anybody give me better and easier suggestions.
I will be using VS2008,Outlook2003 and SQL server 2005.
Many Thanks......
|
|
|
|
|
Trustapple wrote: The options i thought was to write an add in for out look.
But i think there will be easier solutions.
There's a lot of ways to query Outlook, most of them are listed here[^].
Hope this helps
I are Troll
|
|
|
|
|
Hey Thanks for the fast reply.
I will read through this and post an update at the earliest.
Thanks
|
|
|
|
|
Hi All,
If I load a dll or exe using a pinvoke call to LoadLibrary, how do I get the handles of all of the dependent modules? I have tried to create a 'Process' object from the PID (acquired via pinvoke and the handle) but this object cannot be used apparently.
So is there any way to enumerate the modules related to a handle returned by loadlibrary?
Thanks in advance!
|
|
|
|
|
Don't cross post questions: you've got this in 'Quick Answers' as well.
me, me, me
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
|
|
|
|
|
I've deleted it from the quick questions section
|
|
|
|
|
|
I received a message asking 'Why' which I think has been deleted.
The why is that I would like to present the resources from an exe or dll, but also show the resources in any modules that are loaded. So for example, if you wanted the icons in the windows picture and fax viewer, you see that the process is explorer.exe, but it doesn't contain the resources, it's the shimgvw.dll (from memory) module that contains the resources - so in some cases a recursive search would be useful.
|
|
|
|
|
Hello people,
I am using Ent Lib 4.1 to perform validation on my winform application. the winform has tabpages each having controls, mostly comboboxes. The comboboxes are bound to the table from which it gets the droplist items. I have set the NOT NULL VALIDATOR on each combobox.
It works fine if the combobox item is not selected(i.e if its empty). It performs validation.
The issue is after selecting an item from the droplist, and when I move to the next control. It gives the error "The supplied value could not be converted to target property type."
Any suggestion how to solve this..
Thanks.
|
|
|
|
|
hii everyone,
Iam working on TabletPC handwriting synthesis
iam using MICROSOFT.INK SDK
i want to erase specific portion of the ink dynamically
example : i write CAR using my handwriting , I want to erase the alphabet C,R and want to get specific portion of A only
please help me out , how can i erase defined specific portion dynamically without using INK ERASEMODE/DELETE MODE functionality (of stroke selection first den use erase mode), I dont want to do it manually after selection and den usong delete mode
I want to do it Programatically
please help me out
with regards
Amit
|
|
|
|
|
|
So, what's your question? All you did was post some code (and improperly formatted at that).
You can only inherit from one class, but you *can* inherit from multiple interfaces, and you can inherit from one class AND multiple interfaces.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
I have to say I agree with John. You haven't asked a question, you have just pasted in some a lot of code which isn't properly formatted.
The fact that you can't have multiple implementation inheritance, but can have multiple interface inheritance is well known in C#.
You can explicitly implement a property or method for an Interface:
http://msdn.microsoft.com/en-us/library/aa288461(VS.71).aspx[^]
Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
Multiple inheritance is bad, hmmkay?
I are Troll
|
|
|
|
|
Sorry, but there is something that has always bugged me about your sig:
Eddy Vluggen wrote: I are is Troll
FTFY! There is, after all, only one of you
Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
Keith Barrow wrote: There is, after all, only one of you
Meh, that's debatable. If you believe in reincarnation, then there's only one you at a time
I are Troll
|
|
|
|
|
please anyone tell me where i found JockerSoft.Media.dll actully im working on live video and want to extract and save frames of that video through C# code...and require this dll to add in my project...
|
|
|
|
|
Words fail me, and that doesn't happen very often. You found the article[^] this related to as evidenced by the fact that you posted the same question there, but you completely failed to download the actual source code from that same article. That's a fail on an epic scale. Here's a hint - look at the top of the article. There are two downloads; try them.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|