Posts by rubStackOverflow • 7,372 points
226 posts
-
3
votes3
answers1608
viewsA: Is it possible to backup a remote bd sql server via c#?
Alternative without Procedure Obs: Change NOMEBD of command SQL to the name of the bank. using System; using System.Data.SqlClient; namespace teste { class Program { private const string…
-
1
votes1
answer70
viewsQ: Autofac. Dispose or not
There is a difference in performance or best practice between the two examples? Example1: private void Teste() { using (var scope = Container.BeginLifetimeScope()) {…
-
2
votes1
answer56
viewsQ: What is the function of the Deploy option in Visual Studio?
Community, when I went to compile a project I received the message that should mark the option Deploy. Hence a doubt arose, I would like an explanation (the more detailed the better :) on the option…
-
1
votes1
answer574
viewsA: How to use Reference in an XML signature?
Reference represents the element of a digital XML signature defined by the digital signature specification (www.W3.org/TR/xmldsig-core/). Some properties available font: MSDN: Digestmethod: Obtain…
-
1
votes1
answer500
viewsA: Error Signing XML, URI Invalid VB.NET
The method also accepts a tag of the kind string, I think the easiest way to locate uri to be signed (Id) is by name: Dim tagAss = "infNFe" Dim _Uri As XmlAttributeCollection =…
-
1
votes1
answer120
viewsA: Validation of Textbox in Visual Basic 6
Test this way with the method txtPedidoCotacao_Change(): Private Sub txtPedidoCotacao_Change() If IsNumeric(txtPedidoCotacao) Then cmdMontaPedido.Enabled = True Else cmdMontaPedido.Enabled = False…
-
1
votes3
answers3047
viewsA: Unfulfilled Nfe XML
Here comes a solution: static void Main(string[] args) { string fileName = "c:\\temp\\arquivo.xml"; var nfe = XElement.Load(fileName); var nfeCarregada = Serializer.Deserialize<TNfeProc>(nfe);…
-
6
votes2
answers699
viewsA: Origin of object orientation
As noted above, when it comes to "What origin?" "Who invented?" and "Where did it come from?" there is always controversy and heated discussion. Depending on the point of view, the origin of the…
-
0
votes1
answer235
viewsA: Add List(Of String) to a Form’s Listbox
To add this information to Listbox utilize Datasource: Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Dim arquivo As New List(Of String) arquivo.Add("file1")…
vb.netanswered rubStackOverflow 7,372 -
0
votes3
answers262
viewsA: How to Pass Arguments to a class Ex: Dim t as new TL("string","string","string")
Dim Ftpserv As New FTP("Server", "User", "Password") If you are really making this call the error is in "New FTP"
vb.netanswered rubStackOverflow 7,372 -
1
votes3
answers2375
viewsA: Grab part of the text that is between tags of a string
A possibility would be: Sub Main() Dim minhaString = "Meu nome é <nome>Nicolas Carlos da Silva<nome>" Dim nome = minhaString.Substring(minhaString.IndexOf(">") + 1,…
-
1
votes2
answers1065
viewsA: VBA Control of hours/employees
Follows code that can be used as base: Sub teste() 'Linha/Coluna BASE Dim linPlan1 As Integer Dim colPlan1 As Integer colPlan1 = 1 linPlan1 = 4 'FUNCIONARIO Dim nomeFunc As String Do While…
-
6
votes2
answers2094
viewsA: Principle of Liskov’s replacement
The Liskov substitution principle (The Liskov Substitution Principle), corresponds to the letter L of the acronym SOLID (Abbreviation of the first five principles of object-oriented programming and…
-
2
votes3
answers7424
viewsA: What are the main differences between VB.NET and C#?
Or is there any case where it is extremely advisable to use a language and not the other? It is not exactly a case that I will mention, it is more a advice: courses, tutorials, examples, libraries,…
-
2
votes1
answer208
viewsA: How to send Email with HTML formatting to Windows Phone C#
According to that answer and the description of the property Emailcomposetask.Body on MSDN: The Body Property does not support HTML formatting. There’s no way. However you can use this component…
-
1
votes2
answers2942
viewsA: How do I get the Server time or current time of day and switch to the system via code?
class Program { //necessário privilégio administrador [DllImport("kernel32.dll", EntryPoint = "SetSystemTime", SetLastError = true)] public extern static bool Win32SetSystemTime(ref SystemTime…
-
2
votes1
answer2680
viewsA: Return of Authorization Nfe 3.10 (MG) C#
As I explained to you "earlier" has an error in the configuration of the MG webservice, just above: Object[] Results = this. Invoke("Nfeautorizacaolote", new Object[] { nfeDadosMsg}); Look for:…
nfeanswered rubStackOverflow 7,372 -
1
votes1
answer2287
viewsQ: Consume DLL C on VB6 or C#
I have a DLL (gbasmsb_library.dll) provided by Farmácia Popular responsible for returning some functions for interaction with this environment. I think it is a DLL written in C, I need to consume…
-
0
votes2
answers803
viewsA: Error 4 The type 'System.Data.Entity.Dbcontext' is defined in an Assembly that is not referenced
In your project: Right click on References > Add Reference ... Choose the tab Browse click on the same name button Browse Search the Folder of your project > packages >…
entity-framework-6answered rubStackOverflow 7,372 -
1
votes1
answer626
viewsA: How can I show the next 7 Days (Calendar) C#
Create a static class static class Intervalo { public static IEnumerable<DateTime> IntervaloDias(this DateTime data, int dias) { return Enumerable.Range(0, (data.AddDays(dias) -…
-
1
votes2
answers80
viewsA: Error trying to define or read the value of variables already defined - System.Nullreferenceexception
I played the code here and realized the following: wordBuffer = null; //is an array, change by the code below or in the way you think best var wordBuffer = new Array[20]; Match(s) //(s) did not see…
-
3
votes5
answers1506
viewsA: Read XML file in C#
Only items from the first pre-sale var xdoc = XDocument.Load(@"c://temp//orcamento.xml"); //somente primeiro orçamento var lv1s = from lv1 in xdoc.Descendants("orcamento") where (string)…
-
0
votes1
answer970
viewsA: Nfe shipment to MG in Versao 3.10
See if it works: (1) .Any = New XmlNode() {xmlDoc} 'dad.Any(0).OuterXml conteudo do arquivo xml (2) Dim serv = New NFe.NfeAutorizacaoSoapClient 'verifique as propriedades adicionais de…
-
4
votes1
answer636
viewsA: COM Interop with Client and Server
Apparently your code is correct, I will share my experience, C# Interop with VB6/C# (VS 2012) may help you in some details that are missing. Open the properties(properties) menu of your project…
-
3
votes1
answer5050
viewsA: How to Read MFD Files Tax Hard Disk Printer
If you do not want to develop this solution follow this tutorial: Capturing MFD and generating the document mirror by WINMFD2 Download the tool: Installer Winmfd2 Short Tutorial: Select source file…
-
1
votes1
answer218
viewsA: Element <Strong> returning empty - Htmlagilitypack
private void button1_Click(object sender, EventArgs e) { var uri = "http://busca.submarino.com.br/busca.php?q=eletrodomesticos+e+eletroportateis&page=1"; webBrowserControl = new WebBrowser {…