|
thank you for your response. it has solved my problem.
may i introduce you to my new situation?
i would like a way to make the "Home:" part in bold.
i have found very little info on this on my searches. the following are the only actual code that i could understand.
rtb1.Rtf = @"{\rtf1\ansi {\b hello} {\i World}}" ;
richTextBox1.Rtf = @"{\rtf1\ansi This is in \b bold\b0.}";
-----------
im not sure how to proceed with this info. i just want the richtextbox to display "Home:" and "Away:" in bold and be able to handle URLs in text.
please advise what should i specify when searching this potic on google or any reference your could think of would be of great help.
|
|
|
|
|
You seem to have most of what you need there already, but have a look at this[^] - it's in VB, but it's pretty clear.
Just think of rtf as an unreadable HTML file and you are just about there!
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
|
Hi
Am i ask a hard question about 4hours ago.
|
|
|
|
|
Your question is indeed tough. You have to wait patiently for an answer by somebody who knows the answer.
|
|
|
|
|
The reason you did not get an answer is because
a) It was a repost.
b) Your original was replied to, and you reposted last time
http://www.codeproject.com/Messages/3302834/Re-backup-database.aspx[^]
c) There are many examples on CP about to achieve what you want to achieve.
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|
|
My question was changed.
I asked that how can i backup from database.
I got my answer and check it when my database attach to microsoft sql.
but it is necessary for me to use SQLEXPRESS and that way doesn't work when i add my database to SQLEXPRESS and detach from microsoft sql.
I explain more about 4 hours ago.
If somebody know the answer please help me.
|
|
|
|
|
Does shouting and hassling people work in your company? Because in all the ones I've worked in, it just gets peoples backs up, and (certainly with me) reduces the amount of help given to the minimum they can get away with. Just thought I'd mention it...
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
please !
I don't think that i'm shouting or... .
I thought that i used wrong sentence or wrong structure because my first language is not english.
but if i told in bad way , i'm sorry.
|
|
|
|
|
using UPPER-CASE is equivalent to shouting.
|
|
|
|
|
REALLY? I WAS WONDERING WHY MY FRIENDS WENT DEAF WHEN I TURNED MY SCREEN-READER ON
[edit] Never mind, that sounded funnier in my mind.
modified on Monday, December 14, 2009 3:58 PM
|
|
|
|
|
|
Hello,
I'd like to create an array, and have it contain two items (two-dimensional) of two different types.
I believe the best way to do this is create my own type, however, I'm unsure how to handle the need for an array.
For instance, I want to create something that will take in:
SnapShot[i] = ( DateTime DateTime.Now, Int Size );
How can this be done?
Thanks,
Matt
|
|
|
|
|
Why not use a Dictionary?[^]
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
Thanks!
This will work for two items.
What can I do if I want to store more items?
Thanks,
Matt
|
|
|
|
|
Then I would create a class to hold the info, and either use a Dictionary or hold it in a List<T>. You get the flexibility of the array, but without the need to specify the initial size .
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
I'd suggest creating a SnapShotInformation class with Date and Size properties.
You can then maintain a List<SnapShotInformation> . This has the advantage of being more maintainable and the size of the list is dynamic (ie you can add more items to is and it will resize).
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|
|
why Class? Shouldn't struct be enough?
I Would use struct instead class. Because you do not need to hold any Function only data
|
|
|
|
|
Saksida Bojan wrote: I Would use struct instead class. Because you do not need to hold any Function only data
It is correct in C++ but not in C#. A struct in C++ is mainly used for POD types and in C#, you hardly write structs. You write it only when you need value semantics or you need to communicate with legacy APIs.
Best wishes,
Navaneeth
|
|
|
|
|
Is there performance drop? I use a lot of Struct in some of mine programs when I needed to hold a lot of Data structure within array (Not using PInvoke or accessing COM object). Is it better to use struct or class?
|
|
|
|
|
You might, under certain circumstances use more memory.
See
http://msdn.microsoft.com/en-us/library/ah19swz4(VS.71).aspx[^]
The things to note are (Quotes directly from above):
1) Struct are value types. Classes are reference types.
2) Structs have no inheritence (other than object).
3) "The struct type is suitable for representing lightweight objects such as Point [e.g. a Cartesian Co-ordinate]"
4) "Unless you need reference type semantics, a class that is smaller than 16 bytes may be more efficiently handled by the system as a struct."
C# is very different to c++ in this matter, I've been developing C# for about 8 years now, and have never needed a struct (though I have used them from 3rd party stuff).
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|
|
Is there a performance hit when utilizing a List<class> versus a class[array] (and dynamically sizing this array)?
|
|
|
|
|
Both are held on the heap, so I don't think there won't be much of a performance hit, however if performance is an issue, you could benchmark for yourself.
Generally, IMO, unless you have massive arrays or massive objects performance has never been a worry and even if this is the case good design normally mitigates againt this. Modern machines are fast and have plenty of memory (even if this is restricted by the .net framework) so code readabilty is more of a factor in my experience (this would definately go down with an array that needs resizing). I'm not saying that performance shouldn't be considered, I just think that getting clean code first is better, then run the optimizers over the code, and if you see any bottlenecks really work at those, optimizing too soon (which often equals unecessarilty) really wrecks good code.
Additionally, if the array is frequently resized, this can use up resources as the array is copied and re-sized (and hence my benchmarking suggestion above).
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|
|
I agree with your ideology. Thanks for explaining.
When an array is re-sized, the data is actually copied/recreated? Are you sure about this?
|
|
|
|
|
Due to the way arrays are implemented they cannot directly resized.
Array.Resize[^] provides resize functionality, but it actually does a copy underneath (as if you created an array of the new size and copied the items across) so the array instance actually changes.
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|