|
We should team up mate... you can be Batman, I'll be Robin
|
|
|
|
|
The general dead giveaway for me is the use of the phrase "C# v application" where v is either 2008 or 2010. They also tend to like to use "console application" and "windows service" a lot, as well. They always seem to end the post with the same general question.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Yup. Surely one organisation can't employ that many people who can't do the job, and put them on the same task.
|
|
|
|
|
I am getting the following warning and error message for a C# 2008 application I am working on:
Warning 17 The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias;
using definition from 'c:\Program Files (x86)\NLog\.NET Framework 2.0\NLog.dll' sample
Error 21 The type or namespace name 'Nlog' could not be found (are you missing a using directive or an assembly reference?) C:\Sample.cs 15 7 samplef
I am getting this error message since I am trying to add the NLog open source tool to the solution file for 3 different project files in this solution.
I am completing the following task:
1. I add a reference to this dll in the references section of each proejct file.
2. I then place a 'using NLog' statment in each proejct file.
Can you show me code and/or tell me how to fix this problem?
|
|
|
|
|
Are you sure you did it right? Do you have reference to that dll in project that contain sample.cs? Maybe do you have errors in dependent projects? Or namespaces clash?
No more Mister Nice Guy... >: |
|
|
|
|
|
Hi,
Programatically I want to convert html file into tiff file.Can any body please help me how to do this using c#?I want to use this code in windows forms application. I just tried like below.
Image img = Image.FromFile(InputFile);
img.Save(OutputFile, ImageFormat.Tiff);
InputFile is a variable which is having path of a input html file. OutputFile is also a variable which is having path of output file.
When the first statement executed I am getting following exception.
"System.OutOfMemoryException: Out of memory"
Thanks in advance.
modified 14-Nov-12 7:41am.
|
|
|
|
|
See here[^], you cannot load an HTML file into an Image object, the file must be a valid image type.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Hi Richard,
Can you please tell me how to convert a html file into tiff format using C# code programmatically?
|
|
|
|
|
It's easy enough to find. Click this[^].
|
|
|
|
|
Downvoted this because you just repeated your initial question without apparently having read the content of the post you replied to.
HTML is not an image format. What you are asking makes no sense.
|
|
|
|
|
Is it possible to get current user's password using "MAPI"
in c#?
if yes than how?
Thanks
|
|
|
|
|
Errr no. It would be a massive security hole if you could.
Why would you even want to do this?
|
|
|
|
|
actually i want to get my password after log in in outlook i could get my email address but not password is it possible to know my password using MAPI in c#
|
|
|
|
|
Wow. Did you even read Pete's answer?
No more Mister Nice Guy... >: |
|
|
|
|
|
Sanjeev9918 wrote: is it possible to know my password using MAPI in c#
Maybe if I put it another way. NO! It would be a massive security hole if you could. Massive as in the press would be screaming for someone's head. Questions would be asked by governments. The world will tilt off its axis. NO!!!
|
|
|
|
|
So is it possible, or not?

|
|
|
|
|
Pete O'Hanlon wrote: The world will tilt off its axis. NO!!!
No way, Pete! That ain't going to happen until the end of this year or so I've been told.
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|
|
Pete! Pete...breathe in.
Breathe out...
Breathe in...
Breathe out...
And...relax.
If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.
|
|
|
|
|
What part of "NO!" don't you understand?!
|
|
|
|
|
I'm not sure whether it was the N or the O. They're tricky.
|
|
|
|
|
I know, it's confusing when you put multiple letters together like that.
|
|
|
|
|
Sanjeev9918 wrote: Is it possible to get current user's password using "MAPI"
No its not.
Don't know if any hacks exist, but if they do, I smell trouble.
|
|
|
|
|
Abhinav S wrote: I smell trouble
That would be my new aftershave. Calvin Klein's Trouble.
|
|
|
|
|
I am getting the error message,"Error 19 'LogManager' is an ambiguous reference between 'Common.Logging.LogManager' and 'NLog.LogManager'".
In a C# 2008 application I am trying to add nlog open source logging tool to an application that is already using common.logging that was obtained from the following location: http://netcommon.sourceforge.net.
I have added a reference to the NLog file and I have added the Nlog to the using statement.
The problem is both tools use an object called 'LogManager'.
Thus can you tell me how to solve my problem so I can use both Logmanagers.
The following is my code listed below:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="common">
<section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
</sectionGroup>
</configSections>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<targets>
</targets>
<rules>
</rules>
</nlog>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Common.Logging;
using sample;
using System.Configuration;
using System.Xml.Linq;
using NLog;
namespace sample
{
public class Etest
{
private static Logger logger = LogManager.GetCurrentClassLogger();
private static ILog log = LogManager.GetCurrentClassLogger();
}
}
|
|
|
|
|
You have to preface the LogManager object with the namespace that it's coming from, either NLog.LogManager or Common.Logging.LogManager.
You can shorten the namespace for the Common one by changing the using line for it to something like:
using CL = Common.Logging;
Then you can use CL.LogManager .
|
|
|
|