Visual CSharp .NET - convertir codigo

 
Vista:
sin imagen de perfil

convertir codigo

Publicado por alexis (59 intervenciones) el 17/07/2012 21:54:34
buenas tardes por favor deseaba si me podrian ayudar con la traduccion de este codigo de visual basic a c #


.net visual basic 2005
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Runtime
 
 Dim eventLog As New Diagnostics.EventLog
        Dim text As String
 
       If Not eventLog.SourceExists(Dts.Variables("v_sourcename").Value.ToString) Then
            eventLog.CreateEventSource(Dts.Variables("v_sourcename").Value.ToString, "Application")
        End If
 
 
.net codigo c # 2008
lo traduje de esta forma
 
using System;
using System.Data;
using Microsoft.SqlServer.Dts.Runtime;
using System.Windows.Forms;
 
using System.Collections;
using System.Diagnostics;
 
 EventLog eventLog = new EventLog();
            String text;
 
if( ! eventLog.SourceExists(Dts.Variables["v_sourcename"].Value.ToString()) ){
            eventLog.CreateEventSource(Dts.Variables["v_sourcename"].Value.ToString(), "Application");
        }


no me aparece la propiedad SourceExists ni tampoco CreateEventSource
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

convertir codigo

Publicado por roger (12 intervenciones) el 26/07/2012 20:36:19
con esta herramienta lo puedes convertir http://www.developerfusion.com/tools/convert/vb-to-csharp/

Saludos
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar