|
Hi All,
Can you please suggest me some good article on CLR and also some article which has got the tips to write optimized code in C# to take maximum advantage of CLR.
Anticipating your earliest reply
Thanks and Regards
Anushree
anushree
|
|
|
|
|
Writing efficient code is not at all a round the clock process. But it take little time to leverage the effective use of CLR. Try to read maximum articles available in CP.Specifically try to read article and its critics too. According to me, you can only write efficient code once you know where to use which constructs.
Please refer this.
Optimization Hope this will surve a little.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
|
I'm a beginner at C#, but this seems a bit whacky to me. I'm writing a program that parses an html file, reading it line by line. Each line is saved in a String. When it reads the line <tr> and I try to compare that String to another String, it throws a System.ArgumentException. Is there something in <tr> that is invalid?
|
|
|
|
|
I have one DataGrid which is bound to ArrayList. By default I'm all the columns in that Grid are non editable. But I'm not able to make one column editable after the initial load of the grid. I'm using following code...
DataGridTextBoxColumn columnStyle = (DataGridTextBoxColumn)(dataGrid1.TableStyles[0].GridColumnStyles["Spread"]);
columnStyle.ReadOnly = false;
Thanks
Ajay
|
|
|
|
|
|
Hi All,
I am creating a custom Datagrid but on any postback all of the text for the Header disappears!
If I do a "this.Parent.Page.DataBind()" the header reappears...but I lose all of the data changes that were made to the datagrid!
Any ideas as to why a postback would clear out my header? And how I can fix this?
Many thanks in advance!
BTW, Mihir, I really appreciate all of your help... your suggestions for my other problem helped alot and that part is working now )
|
|
|
|
|
Hello,
On my question below on how to derive from an internal class (see here[^]), I have two possible solutions:
1. To dynamically create a derived class from TabControlDesigner .
2. To use directly TabControlDesigner as the designer for my class.
Since I don't want to modify the TabControlDesigner class, solution 1 would be preferred. However, I'm stuck on trying to create (or change) a custom attribute (DesignerAttribute ) for my TabControlEx class. I can get an array of all custom attributes, but only those defined at compile-time.
I have a third solution, which is to implement my own TabControlExDesigner , and privately contain a dynamically created TabControlDesigner and call its methods. But they are around 20.
Is there any way around this?
Or, is there a way I can set the designer class at run time?
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Just asking: have you tried [Designer("System.Windows.Forms.Design.TabControlDesigner")]
Maybe you've already tried it, but you never know.
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
|
|
|
|
|
Yes, I did. The compiler didn't like it because that class is internal . Same error that if I try to derive from that class.
For the moment, I don't have the designer attribute, and it seems to work fine (if I add the control manually, the regular tab control designer is used.)
Thanks!
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Well, i didn't do anything, but: You're Welcome!
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
|
|
|
|
|
Hey there, I'm currently trying out a multiple monitor setup, and for the most part I like the results. The one issue I'm having at this point is when running a full screen application on one monitor, I can't effectively use any other monitor. One of the following two things happens:
A) I can move the mouse to the other monitor(s) but upon clicking, the fullscreen application loses focus and minimizes
B) I cannot move the mouse away from the full screen application
For the most part B is not a problem, but I would like to be able to set a hot-key to switch focus away from the application without minimizing it.
So, it seems fairly obvious that I need to intercept and discard the focus lost message to fix A, and maybe set up a hotkey to provide alt-tab like functionality, again preventing focus loss, to fix B. Unfortunately my message handling experience is limited and c++ based, and I'd like to do this in C#.
Does anyone know if something like this exists already? If not, I'd appreciate a push in the right direction to do it myself.
Thanks!
Dave Miller
|
|
|
|
|
Do those problems occur with every app, or only with games?
I've got 2 moitors, and i can swap programs and move my mouse when-/wherever i want, as long as i'm not playing some (DirectX ?) game.
Sorry i can't help you any further...
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
|
|
|
|
|
It is usually games that cause problems, but I'm sure there are exceptions.
|
|
|
|
|
Well, then i don't know anything too...
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
|
|
|
|
|
How can I pass value from WindowForm to another WindowForm like click ok button in form1 and fill data in listview of form2. I try to use public modifier but it doesn't work. Thank you.
Ps. I use modal form.
|
|
|
|
|
This often comes up in the forum among object-orientation beginners. I suggest you search the forum. Basically, pass your Form1 instance to Form2, then in form2, call form1Instance.SomePublicValue to get to the value.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Homosexuality in Christianity
Judah Himango
|
|
|
|
|
The best way is to pass only the data needed to the second form before calling ShowDialog through a public property.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
Anyone know how to convert a Julian type date (example: 05189 - Format YYDDD) to a current DateTime using C#.
Thanks
|
|
|
|
|
Create a DateTime structure from the year and add the number of days less one:
new DateTime(2000 + 5, 1, 1).AddDays(189 - 1)
---
b { font-weight: normal; }
|
|
|
|
|
Hello,
I'm writing a little TabControl derivative to provide a SelectedIndexChanging event. I would like to add designer-support. I currently can create the object in the designer, but I have to implement a lot of code in the TabControlDesigner internal class (in System.Design.dll, see with .NET Reflector.)
Since it's basically a normal TabControl , I would like to avoid all the work and just use the same designer support, but the class is marked internal, so I can't specify it in the Designer attribute.
Is there a way (using reflection for example) to use this class as my designer?
[EDIT: Actually I don't need to derive from it. If I could specify it in the Designer attribute, it would be enough.]
Thanks,
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Hey, i need to BOLD some words inside a string that is part of a smtpmail body.
Here is my string:
string Message_body1="User password reset " +usename +"\r\n \r\n \r\n Login information for this user has been reset. \r\n \r\n login id:" +UserName ;
I want to bold "login id:"
Dim Beautiful As String
Beautiful = "ignorant"
Label1.Text = "The world is full of " & Beautiful & " people."
Why is common sense such an un-common comodity?
|
|
|
|
|
In a plain-text email, you can't. If it's an HTML email, just use the appropiate tags.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
yah, plain text.... thanks
Dim Beautiful As String
Beautiful = "ignorant"
Label1.Text = "The world is full of " & Beautiful & " people."
Why is common sense such an un-common comodity?
|
|
|
|
|
You have simply to set the message type to html (MailMessage.BodyFormat = MailFormat.Html), then use html tags. To bold a word, just write: <b>your word</b>.
|
|
|
|