|
Can anybody tell what are the important and frequently used design patterns in C# solutions (projects or products)
santosh
|
|
|
|
|
|
sorry the message heading should be "Important design partterns in C# solutions". I just want to know, what are the regularly used Design patterns in C#, so that i can upgrade knowledge related to those patterns
santosh
|
|
|
|
|
kumar.bs wrote: sorry the message heading should be "Important design partterns in C# solutions"
Microsoft patterns & practices are Microsoft's recommendations for how to
design, develop, deploy, and operate architecturally sound applications for
the Microsoft application platform.
Sounds pretty important to me, but what do i know right?
Getting Started[^]
I know for me two of the most important patterns are:
1) Using Web Search Technology
2) Reading
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
mike, thanks for you replies. Thing is that, i don't know for what type of classes or situation what type pattern need to be implemented. So, when you ask me "what classes are you using?" for this i don't have right answer, i mean, i am not doing any hi-fi coding. But trying to explore what type of class needs what type of pattern.
santosh
|
|
|
|
|
That is why I sent you there. It seemed like you could use some bootstrapping on the subject. Sometimes the answers one is looking for cannot be supplied as simply as Do (A) then do (B). Rather they require a contextual understanding before focusing in on a detailed level.
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
The textbox controll doesn't get Paint event, so how can i draw over it?
|
|
|
|
|
Add this string to TextBox constructor:
<br />
this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true);<br />
Best regards, Alexey.
|
|
|
|
|
yes but where is the textbox Paint event?
|
|
|
|
|
In TextBoxBase class.
Best regards, Alexey.
|
|
|
|
|
I have a listview control on a windows form, that is populated with data from the database. How do I ensure that the scrollbars of the listview are always visible, even when the contents are smaller than the control size. If any code could be provided, this would be appreciated.
Thanks in advanced.
listview scrollbar
|
|
|
|
|
I want to use a .vb file in my c# project. Is that allowed? I added one and it does compile, but I don't know how to access the methods in the .vb file.
Can someone tell me if what I'm trying to do is even possible?
Thanks
Joe
|
|
|
|
|
Put the vb files in a seperate project in your solution and compile them as a seperate dll. Add a reference in your c# project to the vb project and you should be able to use all the classes in the vb project.
|
|
|
|
|
Wjousts option is a good one, but another option is to convert the VB file to C#. Google on VB to C# converters and find one you like (we have one also).
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter and VB to C++ converter
Instant J#: VB to J# converter
Clear VB: Cleans up VB.NET code
Clear C#: Cleans up C# code
|
|
|
|
|
Thanks for the input. I went with the option to compile the vb code as a DLL. The reason I chose this option is that the code is used to generate a unique hash and I don't trust a code converter to produce the exact data structures used in the vb code. I'm probably just being paranoid though
|
|
|
|
|
My program reads ID3v1.1 tags from an mp3 file. It works fine except that the 'whitespace' padding between tags is also saved, and I can't figure out an easy way to get rid of them. I was using the .Trim method, but it is not working. I loaded up the mp3 file in a hex editor and found that the whitespace is saved as '00', while a 'space' character (like you get from the spacebar) is saved as '20' and this is probably what the .Trim method is trying to get rid of. Is there an easy way to remove all '00' characters from a string? If I display the string in, for example, a label, they are not shown, however, they are definitely stored there as looking at it in a propertygrid shows.
Thanks for the help.
|
|
|
|
|
Have you tried this?
String delimiters = " \0";
tag = tag.Trim(delimiters.ToCharArray());
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Just tried it and it works perfectly. Thanks a lot!
|
|
|
|
|
Or simply:
tag = tag.Trim(' ','\0');
---
b { font-weight: normal; }
|
|
|
|
|
Hi everybody,
I'm trying to make the bindingnavigator work but I could not find documentation or examples. I want to bind the bindingnavigator to the rows of my datagridview. If this might not be possible via databinding an example of another way would be more than welcome.
Loads of thanks for your assistance,
Elvia
|
|
|
|
|
Bind the grid and the bindingnavigator to a BindingSource component. The BindingSource orchestrates the binding for all things bound to it. Check out this article[^] to see an example.
Josh
|
|
|
|
|
That was what I needed. I already solved it.
Thanks a lot Josh!
Elvia
|
|
|
|
|
Hello,
If I have a label in the edit mode, and the user makes a text selection, is there a way to capture the selected text only. There is an attribute on the text box that does that.
Thank you
|
|
|
|
|
There are a couple of problems here.
1) As far as I know (and I could be wrong) there is no way to get a reference to the edit window hosted by a node in edit mode. If that is the case, then getting the selected text in a node's label is not possible, at least not via the edit window (aka text box).
2) What event(s) would be used to determine when to grab the selected text? What would trigger the logic to get the selected text in the node's label, when the mouse moves or clicks? when a key is pressed? etc.
BTW - the TextBox class offers the SelectedText, SelectionStart and SelectionLength properties, which can be used to get/set the selected text in the control.
Josh
|
|
|
|
|
I am dealing with the TreeView, and TreeNodes, so TextBox is not an option.
Thank you for your reply
|
|
|
|