Quantcast
Channel: Visual C# forum
Viewing all 31927 articles
Browse latest View live

Structs over Classes

$
0
0

Is it better to use Structs instead of classes if my particular data-structure has only numerical data in it?

Please, help.


Best Regards, Lalith


Garbage Collector Data Table

$
0
0

Hi Experts, 

I have the following code that reads a special xml file format generated via SQL Server. The code runs absolutely fine and is scheduled to run as a service but when run its not freeing the memory once the file get processed as checked from the task manager memory.. The memory increases same as the size of file and stays intact. 

I have used the dispose & set to null.

Please advise how can I get the rid of the memory from the data table once finished execution. Am trying the released version as a service. Am also a newbie in C# so please guide. 

using Microsoft.SqlServer.XEvent.Linq;
using System;
using System.Data;
using System.Data.SqlClient;



public static void  QueryPerfReadXeFile(String InputFilePath)
        {
         
            var dt = new DataTable();
            dt.Columns.Add("Event_Name", typeof(string));
            dt.Columns.Add("object_name", typeof(string));
            dt.Columns.Add("object_id", typeof(Int32));
            dt.Columns.Add("object_type", typeof(string));

            
            using (var events = new QueryableXEventData(InputFilePath))
            {
                foreach (var xe in events)
                {
                    var row = dt.NewRow();
                    dt.Rows.Add(row);
                    row["Event_Name"] =  xe.Name;

                    xe.Fields.TryGetValue("object_id", out PublishedEventField object_id);
                    row["object_id"] = object_id == null ? 0 : object_id.Value;

                    xe.Fields.TryGetValue("object_name", out PublishedEventField object_name);
                    row["object_name"] = object_name == null ? 0 : object_name.Value;



                    xe.Fields.TryGetValue("object_type", out PublishedEventField object_type);
                    row["object_type"] = object_type?.Value;

                  
                }
                

            }
            


            dt.Dispose();
            dt = null;

       } 

Thanks

Priya

App.Config SQL Server

$
0
0

Hi Experts,

Currently am reading value from App.Config something like below and its working absolutely fine for a windows service.

<appSettings><add key="FilePath" value="C:\File_Output\" /></appSettings>

Now , the requirement is to read the value from SQL Server table. The service has a polling based on quartz to query the DB every 10 second to check for any new change. Could anyone suggest me best practices for assigning values to a variable which will be used as 

current 

 var path = Path.Combine(ConfigurationManager.AppSettings["FilePath"], $"{query.Request_Target}_{datetime}{format}");
   

Thanks

Priya

C# program execution over the internet

$
0
0

I am attempting to execute a C# program over the internet.  I am trying to do the following:

(1) Initiate the execution of the program from a web page on a client computer.

(2) I want the program to be executed on the server, while all resulting screen displays to be displayed on the client computer's screen.

My question is - Is this doable?

what is benefit from using import and export attribute in mef using .net 4.0 ?

$
0
0

i read on some sites bout mef framework and not understand any thing

can you tell me why using export and import attributes and what is befit ?

please show me any simple example ?

using System.ComponentModel.Composition;
using MefShared.Interfaces;

namespace MefAuthentication
{
    [Export(typeof(IAuthentication))]
    [ExportMetadata("AuthenticationType", "3")]
    public class ThirdAuthentication : IAuthentication
    {
        public string Authenticate(string username, string password)
        {
            return "Authentication Implementation 3 is invoked";
        }
    }
}

Here is export why use export here 

I already use inheritance 

so why use Export 

splitting the panel in split container dynamically when a new device is connected

$
0
0
I have c# application which runs with USB device. Once an USB device is connected,  it displays a real time reading . There is a provision to connect multiple devices. So when multiple  devices are connected , the split container should split automatically to read the data from the respective devices. Please help me. How to dynamically split and resize the panels.

How would I separate words into list items whilst skipping specific characters?

$
0
0

Sorry for the bad title, english is not my strong language :)

Basically I want to separate the below string into separate list items, whilst removing the occurrences of "Id" and stopping the current list item next occurrence of "Id".

string example = "IdPolice Police Officer IdFireDeparment Fire Man IdMedical Nurse";

So the wanted output is this:

List item 1: "Police Police Officer"

List item 2: "FireDepartment Fire Man"

List item 3: "Medical Nurse"

What I've tried:

List<string> items = new List<string>();

foreach (string word in example.Split(''))

{

if (word.StartsWith(Id)

{

items.Add(word);

}

}

After that I'm not sure what to do, I don;t even know if it's right!

Thanks in advance for any help and solutions :)

Autostart application after copied the file

$
0
0

I am using C# 4.5 and SQL Server 2014. I wrote a console application which takes 3 file names and folder which is defined in theapp.config file and validates the data and imports the data in SQL Server.

I have given FTP portal to the client, they upload the data and informed me then manually I am running my exe file then data is importing. But I want an automatic process like once the client uploads 3 files in folder my console application auto start.

I thought of using FileSystemWatcher, but here problem is that if put file watcher to folder, create file event, I am getting event when the file is created, this will not work because I need the event when 3 files copied successfully.

This is my app.config file

<appSettings><add key="SourceFolder" value="E:\UploadData" /><add key="ArchiveFolder" value="E:\UploadData\Archive" /><add key="LogFile" value="E:\UploadData\LogFile" /><add key="DisbursementFile" value="xxx_DISB.csv" /> <add key="EmployeeFile" value="xxx_EMP.csv" /><add key="AmountFile" value="xxx_AMT.csv" /></appSettings>


Thanks Best Regard Naweez


how can i make my first application in ASP .net ?? Please help... I am oracle forms developer and unaware to it..

$
0
0

 How can i make my first application in ASP .net ?? Anyone Please  help...  I am oracle forms developer and unaware to .net .

Please help in learning how can i am able to develop Application through  ASP.Net.

 

Releasing a start up form

$
0
0

Hello,

Will try to explain the problem.
My App, when it is in initial starting state (before Load) initializes different views and establishes DB connections..

So it is busy for seconds..

Following the Old School I've made just a spare short time living form with Always on Top, Centered at the screen plain, where I show some useful licence and Copyright information. Let me call it Banner Form (BF).

When the initialing stack of object is ready, I just Close that Win and the user begins to do some work.

What I have noticed now, when I wanted to add some animation on that BF using threading and the event recall from that thread with data is.. this BF is not yet ready to work until the general App Form is not finished with own start up.

BF is animated only after the Main Form is Loaded, but until that - it is frozen.

How to make that BF active and ready? Should I instead of MainForm Run the app with that BF, and then, on its Load - create and show the Main Form?

Is there any other way to animate (release) BF before all main form objects are loaded and instantiated?


"I = I + 1" .. Isn't it boolshit?

Debugging MVC 5 application in VS 2019 version 16.2.0 gives an error.

$
0
0

Trying to debug my MVC application. Web setting is IIS Express. Set the project url to http://localhost:50016.

When I start the application in debug mode the following line is shown: The program '[7936] iisexpress.exe' has exited with code -1 (0xffffffff).

Using Debug, Any CPU IIS Express (Internet Explorer)

First part of the log is shown below:

'iisexpress.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: Domain 2): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Caching\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.Caching.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Caching\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.Caching.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Build.Utilities.v4.0\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.Build.Utilities.v4.0.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Build.Utilities.v4.0\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.Build.Utilities.v4.0.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.JScript\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.JScript.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\b868da42\6592d97b_54fed401\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualStudio.Web.PageInspector.Loader\v4.0_1.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Web.PageInspector.Loader.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\System.IdentityModel.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activation\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activation.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Web\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.Activities.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.WorkflowServices\v4.0_4.0.0.0__31bf3856ad364e35\System.WorkflowServices.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.DynamicData\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.DynamicData.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\364b0a9b\8270a020_e1b3d501\AggrVariables.BLL.dll'. Symbols loaded.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\dfd2be63\731b9458_e4b3d501\AggrVariables.dll'. Symbols loaded.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\a28f4cda\9539917a_54fed401\Antlr3.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\fe94bdaf\4407c57a_54fed401\Castle.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\195468e9\39f3d77a_54fed401\Castle.Facilities.Logging.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\12aad297\d2b9cd7a_54fed401\Castle.Services.Logging.NLogIntegration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\aeef2d45\e078ec7a_54fed401\Castle.Windsor.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\DanskeBank.Web.Services\1.7.0.0__4127312caedf1589\DanskeBank.Web.Services.dll'. Module was built without symbols.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\dcdb89ee\ff0c207b_54fed401\EntityFramework.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\86a66fd8\5cf7047b_54fed401\EntityFramework.SqlServer.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\0c1d34f9\0090b06b_4a7ed401\Microsoft.SqlServer.ConnectionInfo.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\19117734\00a74194_e4e1d301\Microsoft.SqlServer.Diagnostics.STrace.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\a379f02f\0090b06b_4a7ed401\Microsoft.SqlServer.Dmf.Common.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.SqlServer.Management.IntegrationServices\14.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.Management.IntegrationServices.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\cf73b336\00bde16c_4a7ed401\Microsoft.SqlServer.Management.Sdk.Sfc.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\3d638a4e\00bde16c_4a7ed401\Microsoft.SqlServer.ServiceBrokerEnum.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\9a56554a\00ea126e_4a7ed401\Microsoft.SqlServer.Smo.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\84b79309\00bde16c_4a7ed401\Microsoft.SqlServer.SqlClrProvider.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\80c0dff0\00bde16c_4a7ed401\Microsoft.SqlServer.SqlEnum.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\286962c9\b73af27b_54fed401\Microsoft.Web.Infrastructure.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\assembly\GAC\Microsoft.Web.Services\1.0.0.0__31bf3856ad364e35\Microsoft.Web.Services.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\2dded6ea\6a0f107c_54fed401\Newtonsoft.Json.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\99bed4fd\447c307c_54fed401\NLog.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35\System.Management.Automation.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\b5700ab9\d39cd47b_54fed401\System.Web.Helpers.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\9e75439c\ae45cf7b_54fed401\System.Web.Mvc.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\816eccd1\e8bacf7b_54fed401\System.Web.Optimization.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\d589f069\6a38cc7b_54fed401\System.Web.Razor.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\9c1a4b43\5016d37b_54fed401\System.Web.WebPages.Deployment.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\c9a077fd\fe9ad57b_54fed401\System.Web.WebPages.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\8cea282b\85fed47b_54fed401\System.Web.WebPages.Razor.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\assembly\dl3\1e67e0b1\836d527c_54fed401\WebGrease.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xaml\v4.0_4.0.0.0__b77a5c561934e089\System.Xaml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\Microsoft\Web Tools\Browser Link\Microsoft.WebTools.BrowserLink.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\Microsoft\Web Tools\Browser Link\Microsoft.WebTools.BrowserLink.Tracing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.RegularExpressions\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.RegularExpressions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.RegularExpressions\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.RegularExpressions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.Wrapper.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Data.Services.Design\v4.0_4.0.0.0__b77a5c561934e089\System.Data.Services.Design.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d011b1dc\8c59b61d\App_global.asax.rqzaprqx.dll'. 
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Build.Framework\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.Build.Framework.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Data.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Data.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.DurableInstancing\v4.0_4.0.0.0__31bf3856ad364e35\System.Runtime.DurableInstancing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Internals\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Internals.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Data.SqlXml\v4.0_4.0.0.0__b77a5c561934e089\System.Data.SqlXml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Security\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Security.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Net.Http\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Net.Http.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\SMDiagnostics\v4.0_4.0.0.0__b77a5c561934e089\SMDiagnostics.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xaml.Hosting\v4.0_4.0.0.0__31bf3856ad364e35\System.Xaml.Hosting.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.SqlServer.ConnectionInfo\14.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.ConnectionInfo.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Workflow.Runtime\v4.0_4.0.0.0__31bf3856ad364e35\System.Workflow.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Workflow.ComponentModel\v4.0_4.0.0.0__31bf3856ad364e35\System.Workflow.ComponentModel.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Workflow.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.Workflow.Activities.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\Microsoft.VisualBasic.Activities.Compiler\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.Activities.Compiler.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration.Install\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.Install.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.DataVisualization\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.DataVisualization.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'Anonymously Hosted DynamicMethods Assembly'. 
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/4/ROOT-1-132209557515054406): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Data.OracleClient\v4.0_4.0.0.0__b77a5c561934e089\System.Data.OracleClient.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.


IT Developer in Danske Bank

Syntax for conditions

$
0
0
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows.Forms;


namespace Decompression
{
    public partial class SearchWindow : Form
    {
        public SearchWindow()
        {
            InitializeComponent();
        }

       private bool IsAutoIdValid()
        {
            if(findCarTextBox.Text=="")
            {
                IsGoodsValid();
                return false;
            }
            else if((findCarTextBox.Text=="@tr_numb") && (findGoodsTextBox.Text=="@comment"))
            {
                IsAllValid();
                return false;
            }

                      
          else  if(Regex.IsMatch(findCarTextBox.Text,@"^\*$"))
            {
                MessageBox.Show("Car number must contain only numbers and letters");
                    return false;
            }
            else
            {
                return true;
            }

            

        }

        private bool IsGoodsValid()
        {
            if (Regex.IsMatch(findGoodsTextBox.Text, @"^\*$"))
            {
                MessageBox.Show("Goods name must contain only numbers and letters");
                return false;
            }
            else
            {
                return true;
            }
        }

        private bool IsAllValid()
        {
            if (("@comment" == findGoodsTextBox.Text) && ("@tr_numb" == findCarTextBox.Text))
            {
                return true;
            }
            else
            {
                return false;
            }
        }

        private void btnFind_Click(object sender, EventArgs e)
        {
            if (IsAllValid())
            {
                using (SqlConnection cn = new SqlConnection(Properties.Settings.Default.connString))
                {
                    const string sqlcom = "select* from hawk.dbo.transport where comment=@comment" +"and @tr_numb=tr_numb";
                    using (SqlCommand sqm = new SqlCommand(sqlcom, cn))
                    {
                        sqm.Parameters.Add(new SqlParameter("@comment", SqlDbType.VarChar, 1000));
                        sqm.Parameters["@comment"].Value = findGoodsTextBox.Text;
                        sqm.Parameters.Add(new SqlParameter("@tr_numb", SqlDbType.VarChar, 10));
                        sqm.Parameters["@tr_numb"].Value = findCarTextBox.Text;
                        try
                        {
                            cn.Open();
                            using (SqlDataReader cr = sqm.ExecuteReader())
                            {
                                DataTable dt = new DataTable();
                                dt.Load(cr);
                                this.dgvCarFind.DataSource = dt;
                                cr.Close();
                            }

                        }
                        catch
                        {
                            MessageBox.Show("Information is not find");
                        }
                        finally
                        {
                            cn.Close();
                        }
                    }

                }
            }
            else if (IsAutoIdValid())
            {
                using (SqlConnection cn = new SqlConnection(Properties.Settings.Default.connString))
                {

                    const string sqlcom = "select* from hawk.dbo.transport where tr_numb=@tr_numb";
                    using (SqlCommand sqm = new SqlCommand(sqlcom, cn))
                    {
                        sqm.Parameters.Add(new SqlParameter("@tr_numb", SqlDbType.VarChar, 10));
                        sqm.Parameters["@tr_numb"].Value = findCarTextBox.Text;
                        try
                        {
                            cn.Open();
                            using (SqlDataReader cr = sqm.ExecuteReader())
                            {
                                DataTable dt = new DataTable();
                                dt.Load(cr);
                                this.dgvCarFind.DataSource = dt;
                                cr.Close();
                            }

                        }
                        catch
                        {
                            MessageBox.Show("Car number is not find");
                        }
                        finally
                        {
                            cn.Close();
                        }

                    }

                }
            }
            else if (IsGoodsValid())
            {
                using (SqlConnection cn = new SqlConnection(Properties.Settings.Default.connString))
                {

                    const string sqlcom = "select* from hawk.dbo.transport where comment=@comment";
                    using (SqlCommand sqm = new SqlCommand(sqlcom, cn))
                    {
                        sqm.Parameters.Add(new SqlParameter("@comment", SqlDbType.VarChar, 1000));
                        sqm.Parameters["@comment"].Value = findGoodsTextBox.Text;
                        try
                        {
                            cn.Open();
                            using (SqlDataReader cr = sqm.ExecuteReader())
                            {
                                DataTable dt = new DataTable();
                                dt.Load(cr);
                                this.dgvCarFind.DataSource = dt;
                                cr.Close();
                            }

                        }
                        catch
                        {
                            MessageBox.Show("Goods name is not find");
                        }
                        finally
                        {
                            cn.Close();
                        }


                    

                    }
                }
            }
           
            
        }
    }
}

Unable to find version 3.0.0 of package bootstrap

$
0
0

Hi,

I am working on VS 2017 MVC... When i am adding the view i am getting the below error.

There was an error running the selected code generator.

Unable to find version 3.0.0 of package bootstrap..

Please help me!!!

XML to PDF Converter along with Table of Contents

$
0
0
Looking for a way to generate XML to PDF file along with Table of contents 

saikalyan

doubt in Open/Closed Principle

$
0
0
In Open/Closed principle entities(classes,modules,functions,etc.) should be open for extensions. It means instead of approaching the classed directly, implement the required methods in interface. When a new functionality needs to be added we can add a new interface with the new method.Please let me know am i right or not. Please guide me on this.

Reading a serial device from an UWP app.

$
0
0

(Mods please move this thread to "Developing Universal Windows Apps" section! I just chose a random one)

Hello,

how to properly read from a serial device from an UWP app? I'm trying to read data from an industrial scale; have tried every single possible solution i found on google and still have no idea what i'm doing wrong.

Can someone point me to the right direction? How am i supposed to communicate with a serial device? I have to send commands and read the received reply.

I tried using

Windows.Devices.SerialCommunication: I can find select and config my device but i can't communicate with it as i would like to. I need to send specific string commands and listen for replies, the replies might be ACK/NACK strings or a formatted string with the data i need. I can only read and write using writers but it's not what i need! I just want to send a string and read the response, simple as that! My tentative:

string selector = SerialDevice.GetDeviceSelector("COM2");
            DeviceInformationCollection devices = await DeviceInformation.FindAllAsync(selector);
            if (devices.Any())
            {
                // Setup
                DeviceInformation deviceInfo = devices[0];
                SerialDevice serialDevice = await SerialDevice.FromIdAsync(deviceInfo.Id);
                serialDevice.BaudRate = 9600;
                serialDevice.DataBits = 8;
                serialDevice.StopBits = SerialStopBitCount.One;
                serialDevice.Parity = SerialParity.None;


                // Write with DataWrite
                // Read with DataReader
            }

The flow i'm looking for is more of "i send you this and then wait and read for the answer"

thanks in advance


noob software dev https://filipemadureira.com




I can't connect to MS Access (accdb) database that uses Large Number

$
0
0

I have an Access database that has a table with a field that uses the Large Number data type. When trying to connect using Microsoft.ACE.OLEDB (12 or 16) in C# code, i get following error: 

"The database you are trying to open requires a newer version of Microsoft Access."

In the Microsoft forum cites the problem when trying to connect to this type of database and suggests using the Access version 16.0.7xxxx (https://docs.microsoft.com/en-us/office/troubleshoot/access/database-requires-newer-access). My version of Access I can upgrade to a higher version of the suggested, however, the most current Access engine available is version 16.0.4. How do I connect to this database type without changing the column data type?

Note: I have tried to install several different engines and use the 2016 version of X64 and X32 installed simultaneously.

How to insert the data into Excel Sheet programatically using c#

$
0
0

Dear all,

I have a requirement to insert XML or Data Table data into Excel file (using FileStream). Note - It should not use Microsoft.Office.Interop.Excel.Application. Reason being this code expects Excel software to be installed on the server and here they are not allowing me to install Excel software on the Server.  Please share your ideas and I would appreciate your help. Thank you for your time and support!


Narayana Reddy G

can't AppendText when thread started

$
0
0

hello guys 

when i start thread command AppendText for textbox he did't work 

          int IntHome;
          string[] List;
          private static string[] ListSplit = new string[1];
          private static bool StopChecker = false;

      private void button2_Click(object sender, EventArgs e)
        {
                             Thread thread = new Thread(delegate (object a0)
                    {
                        this.StartWork(Conversions.ToInteger(RuntimeHelpers.GetObjectValue(a0)));
                    });
                    thread.Start(TextBox4.Text);
    

        }

       public void StartWork(int ga6o)
        {
            Application.DoEvents();
            checked
            {
                if (ga6o > this.List.Length - 1)
                {
                    ga6o = this.List.Length - 1;
                }
                Form1.ListSplit = new string[ga6o + 1 - 1 + 1];
                int num = Form1.ListSplit.Length - 1;
                for (int i = 0; i <= num; i++)
                {
                    Form1.ListSplit[i] = "";
                    Thread thread = new Thread(delegate (object a0)
                    {
                        this.Working(Conversions.ToInteger(RuntimeHelpers.GetObjectValue(a0)));
                    }, 100);
                    thread.Start(i);
                }
                for (; ; )
                {
                    try
                    {
                        if (Form1.StopChecker)
                        {
                            break;
                        }
                        int num2 = Form1.ListSplit.Length - 1;
                        for (int j = 0; j <= num2; j++)
                        {
                            if (Form1.ListSplit[j].Length <= 0)
                            {
                                if (this.IntHome > this.List.Length - 1)
                                {
                                    this.IntHome = 0;

                                    return;
                                }
                                Form1.ListSplit[j] = this.List[this.IntHome];
                                this.IntHome++;
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                    }
                    Thread.Sleep(1);
                }
            }

        }
       public void Working(int klb)
        {
            try
            {
                while (!StopChecker)
                {
                    if (ListSplit[klb].Length > 0)
                    {
                        stre = ListSplit[klb];
                      ListSplit[klb] = "";
                        bool flag2 = Conversions.ToBoolean(RuntimeHelpers.GetObjectValue(CheckUser(stre)));
                        if (flag2)
                        {
                            Textbox1.AppendText(stre)
                        }
                    }
                    else
                    {
                        TextBox3.AppendText(ListSplit[klb]);
                    }
                    int slep = Convert.ToInt32(TextBox4.Text);
                    Thread.Sleep(slep);
                }
            }
            catch (Exception ex)
            {
            }

        }

Using Datatable can I find cooresponding DataGridView Row?

$
0
0

I want to update color of row in datagridview based off the row I found in datatable.

foreach (DataRow dr in clsHeartbeat.dtHeartbeat.Rows)
                {
                    DateTime dtNow = DateTime.Now;
                    DateTime dtLastSeen = Convert.ToDateTime(dr["Last Seen"]);
                    double minutes = (dtNow - dtLastSeen).TotalMinutes;
                    if (minutes >= 2)
                    {
                        Console.WriteLine($"  > 2 Minutes  {dr["Machine Name"]}  Last Seen({dr["Last Seen"]}");
                        // Find DataGridView Row and change background color.
                    }
                }


FordIT

Viewing all 31927 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>