|
Thanks Hum Dum. Of course that fixed my problem.
DE
|
|
|
|
|
It may help you .read it.
http://www.dapfor.com/en/net-suite/net-grid/tutorial
|
|
|
|
|
|
Hello guys, how can i do sock5 proxy for this ?
client = new TcpClient(host, port);
setClient(client);
|
|
|
|
|
Maybe this[^] could help you out.
|
|
|
|
|
no i didn't help
i need to connect a gameserver with different ips with 5 tcp clients.
|
|
|
|
|
I'm getting a very weird RuntimeBinderException that I cannot explain. I'm using .NET 4.0 and Workflow Foundation 4.0. The exception occurs when the workflow reaches an activity that uses the class that I assume is raising exception.
"The System.Datetime type cannot be implicitly converted to string".
The code never really reaches the method where the exception occurs (at least I assume it's this method as the console displays my own text that I write to the console in the catch block, though after changing the text it's the the old text I use) but rather seems to throw the exception before the method is actually called.
What's most confusing is that I don't really use any dynamics and made sure I don't implicitly convert a date to a string.
The System.Dynamics namespace is not used anywhere in the entire solution.
I use the SAP Business 1 RecordSet class, which has dynamics as fields, but this is the first time I get anything like this exception and I have been using them for months.
This is the code of the method: http://pastebin.com/FjxeXWB5[^]
This is the exception:http://i45.tinypic.com/mkhyde.png[^]
Thanks.
|
|
|
|
|
Somewhere a DateTime is being passed to a method that is expecting a string, and as it's not implicitly convertable to a string it is failing.
I would add break points in the code at every point where the DateTime instance is used and run until the culprit is found. It should then be easy to determine the problem and the resolution.
|
|
|
|
|
I am using SaveDialog to create a file by passing the FileName. I want to open the file after it's created / saved already. is there anyway to check if the file was completely created? because some files will take time (few more seconds) to get created and it will throw an error when I try to open immediatelly after save because the file was not yet created..
|
|
|
|
|
If I were writing this and I wanted to only open the file when it had finished writing, I would use a simple flag in the save routine and only reset it when the save finished. You could then put a simple test in your file open to only allow the file to be opened when it has finished writing.
|
|
|
|
|
Using the File.Exists method[^] should help you out.
With this you can check if the file exists at the specified path.
|
|
|
|
|
That just tells you that the file has been created, not that it's finished writing to disk.
|
|
|
|
|
Yes. This wont tell the OP if the file has been written correctly or not.
|
|
|
|
|
If you're trying to open the file as read-only, with all the options set correctly, you shouldn't have any trouble opening it right after you created it. If you want more access rights (such as write and delete) or didn't specify them, then some other process might be busy reading your file and thus preventing your general-purpose open operation. Such other processes could include file indexers, anti-virus software, etc.
Try using File.ReadAllText, ReadAllLines, ReadAllBytes for instance, they should always succeed as their name implies they only want to read.
|
|
|
|
|
Yes, you'll get an error. Something about the file being in use by another process, or whatnot.
So, use that. Try to open the file exclusive (no read/write sharing enabled). If it fails, wait a second or two and try again. You'll probably want to put this in a loop so you're not hard coding each retry. The loop will need a bailout value so you're not retrying forever. That value could be, say, 5 times, then return a failure to your calling code.
|
|
|
|
|
I have a project(WFA) in this project there is a need to find the numbers of folders and files with there name
love
|
|
|
|
|
|
Don't bother
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
Hello Code Project
I'm developing an app and i'm having some issues so i hope somebody helps me out
I have a "form" in that form i made a search to a table from a database named "Vehicle_Information"
So i filter the results through checkboxes example
◘ID
◘GPS ID
◘NAME
....
So when the user checks ◘ID, the column of "ID" appears on the Data Grid
i can create an excel file from a datagrid but when the data is created ALL THE COLUMNS AND DATA APPEARS ON THE EXCEL FILE! and i don't want that , i just want the columns the user selected.
My Question is: HOW CAN I SEND TO AN EXCEL FILE A GROUP OF SELECTED COLUMNS OF DATA FROM A DATAGRIDVIEW????
I've tryed so hard :/
Thanks.
|
|
|
|
|
|
Hey Excel object model is a very powerfull object in the .net family. You can easly select Which values to export usind the Range property of the class. For instance if you wanted to export say cell A1 to A12 you can set the Excel.Range("A1 A12") when exporting hope this helps
|
|
|
|
|
The thing is i'm not an expert on C#, and here's an image to show u how i want the program to function
You can notice the checkboxes so, if only check box of ID is cheked then when i click to EXPORT TO EXCEL only the column of ID will exported.
|
|
|
|
|
Which is better to retrieve IP address of PC
|
|
|
|
|
Try reading the documentation on them both.
GetHostEntry[^] - Resolves the specified host to an IPHostEntry object containing address information about the host.
GetHostName[^] - returns the host name of the local computer.
Only one of these returns any IP information.
Or were you trying to refer to GetHostAddresses[^]? I wonder what that does...
|
|
|
|
|
I was trying to get my PC's IPv4 address...
|
|
|
|