|
If you look at the code the same 1MB buffer is being reused. The process footprint is small. There's practically no garbage collection going on.
How long it takes is irrelevant, how the performance degrades with file size is the pertinent question. This is not typical of forward stream operations.
Regards,
Rob Philpott.
|
|
|
|
|
Ahem, you can have arrays larger than 2GB now.Source[^]
|
|
|
|
|
I have a multiproject c# solution which builds in VS2013 on my local machine. When
I do TFS MSBuild in fires the following error:
It's a just a _default. aspx page
<i>The type or namespace name 'Class1' could not be found (are you missing a using directive or an assembly reference?)</i>
What surprises me is that it has no external references and it's calling a class in the same namespace but in another file.
default.apx:
<i><%@ Page Language="C#" AutoEventWireup="true" CodeFile="default.aspx.cs" Inherits="MyProject.Service.Proxy._default" %>
</i>
default.aspx.cs:
namespace MyProject.Service.Proxy
{
public partial class _default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
var a = new Class1();
......
}
}
}
class1.cs:
<i>namespace MyProject.Service.Proxy
{
public class Class1
{
public int Number { get; set; }
public Class1()
{
Number = 1;
}
}
}
</i>
As you can see all classes and files are in the very same namespace.
But if I write the Class1 code in default.aspx.cs IT WORKS!
<i>namespace MyProject.Service.Proxy
{
public class Class1
{
public int Number { get; set; }
public Class1()
{
Number = 1;
}
}
public partial class _default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
var a = new Class1();
......
}
}
}
</i>
I wouldn't like to end up having a too long and unreadable default.aspx.cs
Do you have any clue what I'm doing wrong?
Thanks so much
|
|
|
|
|
Did you include the file in the project? Is it included in the .csproj file?
Are you using an IDE or a text-editor?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Yeah, I did include the file.
I'm using VS2013 IDE.
Should I use csc in command line?
|
|
|
|
|
Should work from the IDE as well; it will look in the csproj file to determine which files belong to the project. Make sure that the file exists.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
i am working on the web project and the issue is that whenever i made any changes in the asp.net designer code ,my session ends automatically
please help
|
|
|
|
|
Hi all.
I want to get all the network activity data in Resouce Monitor use C#.
Anyone can tell me, How I can do it.
I really need some help. Hope someone can help me.
|
|
|
|
|
|
Thank for your reply.
I already read all but not yet find answer.
|
|
|
|
|
I don't think you have read them all. For example A Network Sniffer in C#[^] offers at least a starting point for you to build on.
|
|
|
|
|
|
Thank for your reply.
But I have to write a application to get all the network activity data in Resouce Monitor not use tools.
|
|
|
|
|
hello,
First of all i am beginner in programming.
I have a problem with saving appointments in ms sql db.
Do you have any idea how can i write own DB logic and answer the events. I refer to Project of Ertan Tike dayview calendar control.
All my efforts are unsuccessful.
Thank you in advance
|
|
|
|
|
There's a forum at the end of the article[^]. You should ask your question there.
|
|
|
|
|
Hi and welcome! Without seeing the code I think it will be hard to help you with this. But note that you are using a control from 2006. An excellent control but still things changed a bit since. Adding on top of this (without offending ) that you are a beginner, I am not sure if you want to go into this. I would suggest you try the controls of syncfusion. There is a free community version and good support.
https://www.syncfusion.com/products/communitylicense
good luck!
|
|
|
|
|
Hello Nitzan Levi.
First this link is very useful to me because i didn't know for these controls so only with this you help a lot. The second is that i did not understand how to connnect my own db in their calendar schedule. Could you help me how to do this because i have a similar project in my school. Thank you a lot for your help with syncfusion and sorry for my poor english.
Thank you in advance for your next reply.
|
|
|
|
|
Hi! I'm going mad on this and don't know how to solve it...
I have a class ExecQuery which executes a SQL Script:
public LoadScreen ldScreen = null; //the LoadScreen class
public ExecQuery(ldScreen ld)
{
ldScreen = ld;
}
public void ececute()
{
conn = new SqlConnection(conString);
server = new Server(new ServerConnection(conn));
server.ConnectionContext.ExecuteNonQuery(script); //script is my textfile
}
Now while this executes I'm showing a loading screen with a cancel button. When I hit the button I call an event in my LoadScreen class:
private void cancel_Click(object sender, EventArgs e)
{
ExecQuery exec = new ExecQuery(this);
if (InvokeRequired)
{
BeginInvoke(new MethodInvoker(delegate() { exec.cancelProcess(); }));
}
else
{
exec.cancelProcess();
}
}
This takes me right back to my ExecQuery class and to the method:
public void cancelProcess()
{
server.ConnectionContext.Cancel();
}
where I get a NullReference Exception because server is null. I know why this happens. I shouldn't make that instance of the ExecQuery class at one point but I don't know how to solve this. I tried workarounds and nothing works.
How to get the server variable from the loading screen (which opens before the server variable gets a value)?
|
|
|
|
|
Why not just check the server variable, and if it is null take a different path?
|
|
|
|
|
What a different path? I need to access the connection to cancel it.
|
|
|
|
|
Well I don't know how all your code is put together, so you need to work it out for yourself. If the server variable has not been set, then what else can you do to cancel the connection?
|
|
|
|
|
Create both connection and server object before you start the thread, and pass them as arguments to the new thread. This way you'll have a reference to both objects. Either lock the object or synchronize before accessing it.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I have an windows form application with multiple forms. If I open two of these forms in a runtime, I receive this error:
An unhandled exception of type 'System.AccessViolationException' occurred in Unknown Module.
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
If there is a handler for this exception, the program may be safely continued.
The idea is that I don't have any programs that consume so much memory and this error occurs only after I introduced in script a background worker. It can cause this problem?
|
|
|
|
|
OutOfMemory probably wouldn't cause this. But you know the drill, debug it. What exactly causes it (not circumstances, but specific action being executed in code)? Does it still happen if the work that the background worker does is executed on the main thread?
|
|
|
|
|
Dear Friends,
I have doubt in TPL. When I'm Trying To Break Down List into Multiple List and Save This Data into Single Table With the Use Of TPL. Then It Generate Error: Database is Already Use.
How I manage This Database Connection because All the Element Of List Have Use Connection .
In My Sql Server only 4 connection have been open at same Time and TPL maxParallelism=4 Set by Me.
Please Suggest me Guys How can i Manage It
|
|
|
|