|
tanweer akhtar wrote: i m try to save a file but it does not work
Are you getting an error?
If yes, post the error here and someone might be able to help you.
|
|
|
|
|
hello to all
i m a student
i m interested in C#
i have a problem now
i m aunable to use the '\' or "\" in my program how i can use it in C#
can any body help me
thank lords!!!!!!!!!
best reguards >>>>>>
|
|
|
|
|
|
I think the type of '\' is character,the type of "\" is string
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 8:51am.
|
|
|
|
|
Basically lets say you have 3 items in an array[]
is there a way to do something like this
for (int i=0; i< array[].length; i++)
{
string Name + i = blahblah.tostring();
basically so I would have 3 strings
Name1
Name2
and Name3
|
|
|
|
|
Not that I konw of.
You could use a dictionary<string, string> where the key is the "name
of the variable".
something like:
Dictionary<string, string> blah = new Dictionary<string, string>();
for (int i = 0; i < array[].length; i++)
{
blah.Add("Name" + i.ToString(), "blablablah");
}
|
|
|
|
|
If they are fields/properties instead of local variables you could do something like that with reflection, but you really shouldn't.
|
|
|
|
|
Well what I was thinking is since my current code is giving me an issue with resetting the dataset inside a foreach loop I was gonna do the following to populate a tree view.
string[] AuthorNames = new string[bookdbDataSet.Tables[0].Rows.Count];
int row=0;
foreach (DataRow Row in bookdbDataSet.Tables[0].Rows)
{
AuthorNames[row] = Row["AuthorFirst"].ToString() + " " + Row["AuthorLast"].ToString();
TreeNode [DYNAMIC NAME HERE] = new TreeNode(Row["AuthorLast"].ToString() + ',' + Row["AuthorFirst"].ToString());
rootNode.Nodes.Add(tn);
row++;
}
for (int counter = 0; counter < AuthorNames.Length; counter++)
{
string[] splitarray = null;
string Aname = AuthorName[i].tostring();
splitarray = Aname.split(" ");
bookListTableAdapter.FillByFirstandLast(bookdbDataSet.BookList, SplitArray[1].ToString(), SplitArray[0].ToString());
foreach (DataRow ChildRow in bookdbDataSet.Tables[0].Rows)
{
TreeNode child = [DYNAMIC NAME HERE].Nodes.Add(ChildRow["Title"].tostring());
}
[DYNAMIC NAME HERE].nodes.add(child);
}
So basically I get all the unique author names first and put them in an array
Then I fill the dataset one at a time for each author and then run a foreach to get the titles and then I assign them to the node of the Rootnode's dynamic name
|
|
|
|
|
Well clearly you can't do that, even if "dynamic names" were possible they would go out of scope..
Idea 0: Why don't you just fill and array with them?
Idea 1: Couldn't you nest the loops? Then you would only need 1 temporary variable to hold the current TreeNode.
|
|
|
|
|
well, here is what i was originally thinking but of course I can't do the second fill with the foreach. Thats why I went a different route. I'm sure I'm doing this all wrong but hey I'm learning so what the heck...
http://csharp.pastebin.com/m58597462[^]
|
|
|
|
|
Why can't you do that? As far as I can see you're not changing the collection that the foreach loops over
|
|
|
|
|
Hi all, i'm asking how to use a socket class to listening to all ports and reciving all packets...
Regards
|
|
|
|
|
i think if you make (for) loop to make threads of all ports
|
|
|
|
|
If any one know then guide me.
|
|
|
|
|
|
Actually i made a window application , in which play a video file using window media player. now i want to take a snapshot image. the link you tell me its all about Webcam Service.aspx. i am not working in aspx. so do you have any idea how can i take snapshot using window media player api.
|
|
|
|
|
I don't kownw!
But by using either of WPFMediaKit[^] or Slimdx[^] you should be able to gather more information...
Who knows they might even have a sample.. or they might know if you ask on their discussion list?!
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
Hi all
I have a C header file which describes a plug-in interface. Now, I'd like to implement plug-ins in C#. How would I go about doing that?
The interface uses C native types including callback functions.
Any tips or pointers?
Thanks in advance
Niklas
|
|
|
|
|
I think this might get you started:
Microsoft Add-in Framework[^]
.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
|
|
|
|
|
Are you trying to implement a plug-in in C# for a program that expects native plug-ins?
|
|
|
|
|
Yes, that's what I'm trying to do. I want to do that to be able to create some wizards for visual studio, so that others can create plug-ins easily. Today I have wizards for C++, but I think I'm missing a lot of developers that way.
Edit: The plug-in is just a DLL.
modified on Sunday, January 24, 2010 3:31 AM
|
|
|
|
|
Hi.
I have an (.EXE) file(CrystallReport2005.exe)or anything else.
Can you tell me how can i add this file to my install Shield project to run and install it.
Thank you.
CanI
|
|
|
|
|
create a setup project
then from application folder right click--->Add
then select your files you want to add them in your (exe) file
after that build or press Ctrl+Shift+B
go where the project you created and look in the bin file
|
|
|
|
|
You can use the vs tool:
File > New > Other project types > Setup and deployment
One more thing..
This's not the right place for such question
|
|
|
|
|
Hi Roya Rayane:
When you add all the project output file into your InstallShiled setup & deployment project… There was an option where you can confirm the existing dependencies … InstallShiled has a features to add your desire object from a list of object…For example you build a .Net app setup in that case you can add the .Net framework into your setup & deployment project so when you install your app the .Net framework will install silently if .Net framework is not available in the target machine …
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|