|
|
|
Is there any easier/other way to deep copy a List<anyclass> other than serialize to memorystream and then deserialize into a new object?
The List comes from a method on a remoting server in singleton mode and fills a combobox on a UI. So i guess filling it directly with the ref would be bad practice.
If it' stuck, DO NOT pull harder!
|
|
|
|
|
Take a look at the Clone method.
|
|
|
|
|
List<t> does not interace iCloneable so i would have to
<br />
Foreach(someclass myobject in mylist){<br />
newlist.add(myobject.clone());<br />
}<br />
And the class of the list needs to interface ICloneable
am i right?
If it' stuck, DO NOT pull harder!
|
|
|
|
|
Yes, you will need to create a copy of the list yourself. While, List<T> does not implement ICloneable, ArrayList does. But even so, it's only a swallow copy.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Hello, I'm new here and I've got a problem. I am working on my school project and it entails using a pda as an infrared remote control for TV's / hi-fi systems. I've gone through some of the previous posts here and they helped a little. But the problem now is that while i'm able to connect to the COM2 port and use it as serial communication with the System.IO.Ports namespace, my program keeps freezing when i try to perform a Read(byte[], offset, length) operation. Now i am not even sure if the Write() operation is actually working, however it doesn't freeze my system. Can anyone show me what to do? I need to learn the infrared codes from the remote control and then retransmit them when i need them. please any help is appreciated as time is running out for me. thanks
Emotu
|
|
|
|
|
Have you tried this[^]? It should give you a good example to work from and help you debug your issue.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
thanks a lot for the help Tom. however, i'm trying to control the IR port on a windows mobile, read infrared signals from a remote control and store them before retransmission. If you have something close to this, I'd be extremely grateful.
Take care,
Emotu
|
|
|
|
|
this is my code
<asp:templatefield headertext="FileName">
<itemtemplate>
<asp:hyperlink id="HyperLink1" runat="server" target="_blank" navigateurl="~\Feedback\+<%#Eval(QAFilename)%> +">
<%#Eval("QAFilename") %>
i want one of my column in gridview with hyperlink value so i used the above snippet in my code the actual functionality i want is when i click on the hyperlink button i want that particular file to be opened, so in the navigate url attribute i used "'~\Feedback\ + <%#Eval(QAFilename)%> +'" upto feedback path is is fixed i want to add the filename dynamically but it is not working cananybody suggest me
regards
sunil
|
|
|
|
|
Give a DataNavigateUrlFields="File_id" into the Your HiperlinkField
|
|
|
|
|
the code snippet which i have posted was deleted in my Question
sorry i think i was not clear enough actually i am manually giving path as NavigateUrl='~\Feedback\ after the slash i have to give the name of the file in navigateurl attribute iwant to know how to concatenate my file names after the last slash which are in my gridview
anyway thanks for posting ur answer plz do get me better answer if possible
regards
Sunil
|
|
|
|
|
Why you have put the same question in different board (both in C# and also ASP.NET ).
|
|
|
|
|
actually my proj is asp.net with c#.net coding so i put my question in both anyway i got the solution i used anchor tag in place of hyperlink
|
|
|
|
|
|
i get this error when i attemp to use
SqlBulkCopy.WriteToServer(DSet.Tables[TableName]);
Yogesh Pekhale
pekhaleyogesh@gmail.com
|
|
|
|
|
pekhaleyogesh wrote: SqlBulkCopy.WriteToServer(DSet.Tables[TableName]);
There is a DateTime value out of range bug somewhere inside there, fix the bug there.
Sorry, if you can only give brief description of the problem, we can only give brief answer/suggestion.
|
|
|
|
|
Hi,
sorry !!!
actually I have a project which copies table of MS Access to dataset and then using sqlbulkcopy updates the table on SQlserver2000.
both tables in access abd Sql Servcer 2000:
# have no keys , indexes etc only simple columns
# Both tables of Access and SQLserver 2000 is same
# There is column MyDate as datetime in both DB table.
Now while SQlBulkCopy.WriteToServer(dataset.table) throw an exception
SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.
Yogesh Pekhale
pekhaleyogesh@gmail.com
|
|
|
|
|
|
hi all
i'm doing a mantanence project.
In that some code i write in javascript in html page.
Is it possible to display a variablr value on label when we run the application. If so, then how can it be done
|
|
|
|
|
You give the label an ID. And in javascript use the document.GetElementByID(id) and set the value attribute.
Hope it helps.
There are 10 kinds of people: those who understand binary and those who don't
|
|
|
|
|
if by label you mean an ASP.NET control, the wrinkle is that the ClientID is not the ID you set, so you need to find the client Id for getElementByName
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
P_Elza wrote: label
asp:Label is rendered as a SPAN. You can access the span in JavaScript using document.getElementById("spanid");
|
|
|
|
|
hi, all.
i have a problem on web service server to authenticate, "Username Token", on .NET 2.0 and WSE 3.0 platform.
The problem is that to authenticate client with Java platfrom or something, not .NET. From my understading, the client should refer the WSDL from the server-currently .NET web server. However, the WSDL file or web link such as "http://~.asmx?WSDL" does not give any authentication policy information.
So, what i am saying is that how i can append a policy to WSDL.
i have search this for 4 weeks. now i totally breakdown.
xlegend1024@naver.com
|
|
|
|
|
Hi, I'm a degree student currently working on my final year project and it involves encrypting files being dropped into a removable drive and decrypting files taken from the drive. We've pretty much done up the bulk of the program but cant seem to get around a problem with the encryption process..
Currently, the data that is written to the drive is encrypted only after file watcher has detected that is has finished writing. We're trying to find a way around this as encrypting this file after it has been copied either means that it will take up double its disk space during encryption (encrypting parts of the file in buffer and writng to disk) or taking up its equivalent size in memory (copying data to memory stream and deleting the original file then writing the ciphers to disk).
Is there any way to do something like truecrypt or freeOTFE with c#? i was thinking of encrypting the data during the user's copy operation or perhaps interrupting the actual windows file operations and using my prog to do it for the user..
We cant seem to wrap our heads around as to how this can be achieved, ATM we are stuck with the memorystream method as it provides much better performance, but large files would totally flood memory....
Any help or perhaps pointers as to where i should be looking? Its possible in linux but windows isnt open source
|
|
|
|