Click here to Skip to main content
15,889,831 members
Home / Discussions / C#
   

C#

 
AnswerRe: Namespace problem Pin
Richard MacCutchan21-Sep-11 6:16
mveRichard MacCutchan21-Sep-11 6:16 
GeneralRe: Namespace problem Pin
CCodeNewbie21-Sep-11 6:47
CCodeNewbie21-Sep-11 6:47 
AnswerRe: Namespace problem Pin
Luc Pattyn21-Sep-11 7:09
sitebuilderLuc Pattyn21-Sep-11 7:09 
GeneralRe: Namespace problem Pin
CCodeNewbie21-Sep-11 7:24
CCodeNewbie21-Sep-11 7:24 
AnswerRe: Namespace problem Pin
Luc Pattyn21-Sep-11 7:34
sitebuilderLuc Pattyn21-Sep-11 7:34 
GeneralRe: Namespace problem Pin
CCodeNewbie21-Sep-11 7:48
CCodeNewbie21-Sep-11 7:48 
GeneralRe: Namespace problem Pin
Richard MacCutchan21-Sep-11 8:41
mveRichard MacCutchan21-Sep-11 8:41 
GeneralRe: Namespace problem Pin
lukeer21-Sep-11 21:00
lukeer21-Sep-11 21:00 
Maybe it's just a basic misunderstanding of the assignment operator ("="). It assigns the return value of the right hand expression to the return value of the left hand expression. Let's put it in symbols: Target <- Source.

Further down, the lines SMCommand.Parameters.Add() = Entry.Category each call a method Add() and immediately replace its return value by Entry.Whatever. I can only guess, but maybe you want it to behave the other way round.

Add() returns an SqlParameter. Maybe you want to store that via
C#
Entry.Message = Add("@Message", System.Data.SqlDbType.NVarChar, 250).ToString();
But even then, I doubt that EventLogEntry.Category and EventLogEntry.EntryType would accept a string. In this case, you would have to create some kind of conversion.

Ciao,


luker

QuestionJava script -Print Pin
kathyani21-Sep-11 1:27
kathyani21-Sep-11 1:27 
AnswerRe: Java script -Print Pin
Pete O'Hanlon21-Sep-11 1:36
mvePete O'Hanlon21-Sep-11 1:36 
QuestionHotMail in ASP.net Pin
om_metab21-Sep-11 0:15
om_metab21-Sep-11 0:15 
AnswerRe: HotMail in ASP.net Pin
crocks25621-Sep-11 0:30
crocks25621-Sep-11 0:30 
AnswerRe: HotMail in ASP.net Pin
uspatel21-Sep-11 2:00
professionaluspatel21-Sep-11 2:00 
AnswerRe: HotMail in ASP.net Pin
RichardGrimmer21-Sep-11 6:14
RichardGrimmer21-Sep-11 6:14 
QuestionNot getting Output parameter value Pin
Hum Dum20-Sep-11 23:51
Hum Dum20-Sep-11 23:51 
AnswerRe: Not getting Output parameter value Pin
RichardGrimmer21-Sep-11 6:16
RichardGrimmer21-Sep-11 6:16 
QuestionDynamically changing array Pin
jenya720-Sep-11 21:16
jenya720-Sep-11 21:16 
AnswerRe: Dynamically changing array Pin
Blue_Boy20-Sep-11 21:24
Blue_Boy20-Sep-11 21:24 
GeneralRe: Dynamically changing array Pin
jenya720-Sep-11 21:38
jenya720-Sep-11 21:38 
GeneralRe: Dynamically changing array Pin
Blue_Boy20-Sep-11 21:49
Blue_Boy20-Sep-11 21:49 
Questioncontent is outdated Pin
Hum Dum20-Sep-11 21:06
Hum Dum20-Sep-11 21:06 
QuestionClass design related clarification c# Pin
ragasai20-Sep-11 12:18
ragasai20-Sep-11 12:18 
AnswerRe: Class design related clarification c# Pin
#realJSOP21-Sep-11 2:00
mve#realJSOP21-Sep-11 2:00 
AnswerRe: Class design related clarification c# Pin
jschell21-Sep-11 14:38
jschell21-Sep-11 14:38 
Questionwhat is the best method of drawing for my situation Pin
Hamed Metalgear20-Sep-11 11:12
Hamed Metalgear20-Sep-11 11:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.