|
And be wise enough to know the difference.
teejayem wrote:
Don't be overcome by evil, but overcome evil with good
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
Hello.
Is possible (visual studio 2005, c#) to find hyperlinks in word (.doc) file?
TIA
Regards,
Bojan
|
|
|
|
|
i want to make a copy of one of my existing form including its design view with in that project. i am not able to copy its design view how can i do it please tell me soon.....
|
|
|
|
|
Use the filesystem and not the IDE.
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
Hi,
I want to compare the performance of the logger with log4net, and the the enterprise logging library by Microsoft.
Can you provide me some example on "enterprise logging library by Microsoft" (framework 2.0)
Thanks !
jayasshc
|
|
|
|
|
They hide those examples in the documentation[^]
Test Drive
The Logging and Instrumentation Application Block has been developed as a result of analyzing common enterprise development challenges and successful solutions to these challenges. However, because each application is unique, you will not find this application block suitable for every application. To evaluate this application block and determine its applicability to your projects, Microsoft suggests you dedicate at least half of a day to explore the application block. The following is a suggested evaluation approach:
1. Download Enterprise Library.
2. Install Enterprise Library and compile all application blocks and tools.
3. Read the "Introduction" and "Scenarios and Goals" sections of the documentation.
4. Compile and run the QuickStart samples, and read through the related "QuickStart Walkthroughs" and "Key Scenarios" sections of the documentation.<br />
5. If the application block looks like a good fit for your application, try implementing a simple use case in your application or in a throw-away prototype application using the application block.
|
|
|
|
|
Hi,
Suppose I have a function which takes in 4 objects as parameters like:
methodA(classA obj1, classA obj2, classA obj3, classA obj4)
and inside the method, a check will be performed and depending on the result, either the first three objects will be used, or the last three.
The way I did this in C++ is basically by defining three pointers, and have those pointers point to either the first three objects or the last three depending on the check. And later those three pointers are used to access the data. But how can I achieve this in C#? Thanks a lot.
|
|
|
|
|
When you are using objects, you are actually using references to the objects. The four method parameters are references. To get another three references, you just have to declare them in the method:
classA use1, use2, use3;
if (some condition) {
use1 = obj1;
use2 = obj2;
use3 = obj3;
} else {
use1 = obj2;
use2 = obj3;
use3 = obj4;
}
|
|
|
|
|
|
I have a form with 26 textboxes on it. I need each textbox to have text that is unique from any other textbox on the form. What is an easy way to do this?
Thanks
|
|
|
|
|
Do you want to check whether the texts is unique or do you want to fill the textbox ?
|
|
|
|
|
I want to check if the text is unique from the other 25 textboxes on the form.
|
|
|
|
|
Well the simplest way I can think of off the top of my head is to put the text boxes in a List<textbox> and use nested loops like:
<br />
public bool ValidateTextBoxen()<br />
{<br />
List<TextBox> textBoxen = new List<TextBox>();<br />
<br />
textBoxen.Add(TextBox1);<br />
textBoxen.Add(TextBox2);<br />
...<br />
textBoxen.Add(TextBoxN);<br />
<br />
for(int i = 0; i < textBoxen.Count; i++)<br />
{<br />
for(int k = 0; k < textBoxen.Count; k++)<br />
{<br />
if (textBoxen[i].Text == textBoxen[k].Text && i != k )<br />
return false;<br />
}<br />
}<br />
<br />
return true<br />
}<br />
-- modified at 15:37 Tuesday 25th July, 2006
|
|
|
|
|
Dictionary<string, object> stringProbe = new Dictionary<string, object> ();
stringProbe[textBox1.Text] = null;
...
stringProbe[textBox25.Text] = null;
if (stringProbe.ContainsKey(mustBeUniqueTextBox.Text))
{
// Text is not unique
}else
{
//Text is unique
}
|
|
|
|
|
Hi Guys...
Rather urgent question...
I need to be able to browse all available windows domains on the local network, but the kicker is that I can't garentee that the machine that the app is running on is a member of any domain...?
Does anyone know of a function that can enumerate the domains available?
All the looking I've done requires you to have a domain to start with and if the machines in a work group then how can i look out from that???
|
|
|
|
|
If you could discover all the domains within a network without being part of the domain, MS would have had one MAJOR security hole sitting out there that would have killed them.
Your computer and your user must be part of a domain. From there you still will not see ALL domains. You will only see those domains that trust the domain you are a part of.
Though you should keep in mind that this is specific to the old domain model. For ActiveDirectory and a network that has eliminated the domain controllers, you would have to be part of ActiveDirectory and have the rights to query the AD tree.
|
|
|
|
|
Sorry I don't understand...
if that's the case how does windows provide you with a list of domains that you can join a machine too????
and where do the listings for work groups come from????
I suspect WINS but can't confirm this or find a way to access the information.
|
|
|
|
|
RobStroud wrote: how does windows provide you with a list of domains that you can join a machine too????
It's been many, many years since I added a machine to a domain, but I believe I had to be logged into the domain as an administrator or some other group that has the rights to do the add.
|
|
|
|
|
I have a static data access class. By using the is statement in catch blocks I've followed the exception up the call stack, monitoring it's type as I go. Up until it's thrown beyond the static class it's a System.SpecificTypeException . At the next layer up however, the type information has been lost and it's only a ordinary System.Exception . The loss of type data is cuasing problems for my high level error handler because it uses the type information to help provide useful advise about how to resolve the fundamental problem. Is there any workaround I could use to avoid this problem?
|
|
|
|
|
The exception type that you see is dependant upon HOW you are catching your exception. For example:
...
catch ( Exception ex )
will catch your exception and downcast it to the System.Exception. But if you did this:
...
catch ( SpecificTypeException ex )
then you would not be downcasting it. However your caught exception should also be of type SpecificTypeException unless the catch logic in the framework is mangling it.
|
|
|
|
|
I'm not sure I'm following you. Going up the callstack prior to the switch between the static data acess class and the main app the following code will evaluate the if statement as true of the original exeception was one of hte types being checked.
catch (Exception ex)
{
if (ex is System.Xml.XmlException || ex is System.Xml.Schema.XmlSchemaException)
{
int i = 5;
throw;
}
}
Experimentally I added catch ( System.Xml.XmlException ex) and catch (System.Xml.Schema.XmlSchemaException ex) blocks in front of the catch (Exception ex) blocks at each level of the call tree.
I continue to see the same behavior I described in my original post. One thing I forgot to mention then, at the same time I go from the static class to the main app, I get a VS unhandled exception dialog with the full exception data and break/continue/ignore(disabled)/help buttons.
|
|
|
|
|
If I understand what you are saying,
You see an exception occur in the static class.
You then see the VS dialog.
You then see the second catch and it is now a System.Exception.
Is that correct? If so, then maybe VS is getting in the way of the type.
|
|
|
|
|
hi all i have a question over here regarding entry points..
my actual question is i have linked up 2 forms together..the code is actually from two separate projects..the pro now is when i wanna debug my soln i get this error msg--"...has more than 1 entry point defined"
static void main()
{
Application.Run(new frmTest());
}
i try delete the above code from the 2nd form but it cant work.. wht am i supposed to do to ensure when im linked to the second link my application will run smoothly??
detailed help with codes posted will b greatly appreciated as im new to c# but im willing to learn
thanks
|
|
|
|
|
You can only have 1 active project, and in this project you can only have 1 Main() method.
Use "Find in files..." to find "main" method.
|
|
|
|
|
Hi everybody,
How can I make a column invisble in a DataGrid or how can I give a value to each row besides what is written in it.
Thanks,
Oren
|
|
|
|