|
I have seen ppl using Seriable attribute for Classes. Can anyone explain me wat does Serializable mean? and why is it used?
Maddy
|
|
|
|
|
It means that the class can be serialized. Which means that it can be stored in a file (or db or wherever) and then restored from there later on (it's how sessions work for example).
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
what are the methods that loaded when page is loaded
|
|
|
|
|
What on earth do you mean ? Do you mean in ASP.NET ? Do you want to know the order in which events are loaded ? Page init, page load, events, page pre-render, is the short version. If you mean something else, try to be more clear.
|
|
|
|
|
I made this code for get any file info:
<br />
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click<br />
Dim ParamSeparator() As String = {"GIF89a"}<br />
Dim gif As String = File.ReadAllText(OpenFileDialog1.FileName)<br />
Dim i As Integer = 0<br />
If File.Exists(OpenFileDialog1.FileName) = True Then<br />
For Each files As String In gif.Split(ParamSeparator, StringSplitOptions.None)<br />
If files.Length > 0 Then<br />
ListBox1.Items.Add(i & " " & files.Length + 6 & " 0")<br />
i = i + files.Length + 6<br />
number = number + 1<br />
End If<br />
Next<br />
TextBox1.Text = number<br />
End If<br />
End Sub<br />
But it didn't work with BinaryFiles, because i used ReadAllText, and i want to know how to edit the code for making work with Binary FIles.
Thanks For Any Help
|
|
|
|
|
flash.tato wrote: But it didn't work with BinaryFiles, because i used ReadAllText, and i want to know how to edit the code for making work with Binary FIles.
After looking at your code I cannot even figure out what you are trying to do.
|
|
|
|
|
I want take the lenght between the file Split.
For example if the Split Result is 20 byte i want that it shows the Length of the SPlit Result, but if i use ReadAllText i can't use it with Binary FIles
Young programmer
|
|
|
|
|
If you're reading a file as binary, then you'll be searching for the gif header in a binary array, not a string. So, the code needs to be rewritten to do what you want, a different way.
|
|
|
|
|
Hi All
I have written a program in vb.net 2005 for generating dynamic reports from SQLserver 2000 , the report generates successfuly but when it goes for printing with a network printer that I specify it programaticaly I get this error :
Erorr in file E:/DOCUMEN~1/admin/LOCAL~1/Temp/temp_4fc557_33455ed_{asd33dh3_dsd}.rpt
:unable to connect : incorrect logon parametrs
The code that I using for printing is :
Dim
m AsNew A4Bill
m.PrintOptions.PrinterName = "\\Arash\Microsoft Office Document Image Writer"
Try
m.PrintToPrinter(1, False, 0, 1)
Catch ex As Exception
message.Text = ex.Message
EndTry
Thanks for your Help
Arash Rajaei
|
|
|
|
|
I need a regular expression to use to split a string on whitespace but keep quoted text together.
So far I have "([^\"\\s]+)|(\"([^\"]*)\")" which seems to work fine in most cases, but as I'm new to regular expressions I wouldn't be surprised to find that there are better ways to do this (I just haven't found any).
One of the oddities of this regular expression is that a string like hi"there" gets split into two parts: hi and "there" , which may not be what most users expect.
If anyone has something better I'd like to know.
|
|
|
|
|
I didn't quite know if this is the correct forum, but I have blogged my first Mono experience over here[^], and hope to shed some light on this framework and maybe get some feedback on my initial thoughts.
|
|
|
|
|
Hi all,
Still i am confusing that why we use "N-Tier" archetectur for .NET application.?
Note:
I wnat to know what is the main advantage of N-Tier Architecture for software development?
please help me...!
Pavan Pareta
|
|
|
|
|
for me..
i'm using N-Tier archetecture because of i'm building a WAN environment system and it's need very fast connection and a lot of users from different places.. with a n-tier archetecture u can do a server farm for the middle tier of the system and this is more better that the old client-server archetecture ..
|
|
|
|
|
Seperation. It means that your presentation code, for example, is clean and easy to read, it's not full of business rules or data access code. In theory this means you can replace layers, but that almost never happens. What does happen is, the code is clean, easier to maintain and easier to read.
|
|
|
|
|
Thanks !!!!!
Sir(Christian Graus)
it use is very time consuming for developing any application which have this kind of architechture. please can you explain me properly.
thanx
Pavan Pareta
|
|
|
|
|
It doesn't really take that much longer, for any non-trivial app, it will probably take less, because it is a good step towards stopping the code turning to spagetti.
|
|
|
|
|
thanks
Can we debug Easly this kind of application.????
like i want change in DataLayer.
Pavan Pareta
|
|
|
|
|
I'm sorry, but that's a really dumb question. n-tier apps are no harder to debug than any other app.
|
|
|
|
|
I use n-tier as it is much easier to deploy an application with n-logical tiers on a single machine than to deploy an application with 1-logical tier accross n physical tiers if the need arises. I would also go as far as to say that any non-trivial app with only 1 logical tier is likely to be a very bad design. Even patterns such as the model-view-controller require the use of more than 1 logical tier even if they reside on one machine.
Russ
|
|
|
|
|
In last you have discuss with this line.
"Even patterns such as the model-view-controller require the use of more than 1 logical tier even if they reside on one machine."
can u describ "Model-View-Controller"????.
if you have some more detail about this "N-Tier" Architecture(like .doc file Presentation..etc) please send me my Email Id :pavanpareta@rediffmail.com
Pavan Pareta
|
|
|
|
|
i did a quick search on this site for articles containing model view controller and there are tons of responses.
Essentially it's a way that you can keep the display of your data separate from the underlying data. This means that if you start witha winforms app and then decide you would prefer a website you only have to rewrite the View and maybe some of the controller but the model itself is left untouched
|
|
|
|
|
It's really a pattern to encourage decoupling of the view from the underlying model. This is a good thing because it means that you can add views without having to change the underlying model, and you can control the interaction between the model and the views.
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world."
Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that."
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Christian Graus wrote: In theory this means you can replace layers, but that almost never happens.
So true.
However, replacing small parts of a layer or changing the implementation of a part of a layer is quite often done. This is very much simplified by the separation that is done by the layering.
Even changes that affect more than one layer are simplified. If a method needs to be used differently, just make sure that the signature of the method is different, and a compile will reveal every place in the application that needs changing.
---
b { font-weight: normal; }
|
|
|
|
|
Is there any way to change the naming conventions when using DataSources in VS 2005? Like when dragging a string item from the Data Sources window and it names the object ItemNameTextBox, can this be changed? If so how? I tried google, but I wasn't able to find anything. Either it can't be done or I don't know what to search for.
Thanks
Mike Lasseter
|
|
|
|
|
I have sample in which is running in VS2003 and the sample which I tried to run in VS2005 (V2.0.50727) gives me the below error.
Unable to start debugging. Iam getting the error message as given below.
1. The application you are trying to debug uses a version of the Microsoft .NET Framework that is not supposed by the debugger.
2. The debugger has made an incorrect assumption about the Microsoft .NET Framework version your application is going to use.
3. The Microsoft .NET Framework version specified by you for debugging is incorrect.
For solving this issue I did
In the Registry Editor, open the HKEY_LOCAL_MACHINE folder.
Navigate to: HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\8.0\AD7Metrics\Engine\{449EC4CC-30D2-4032-9256-EE18EB41B62B}
then created new string "CLRVersionForDebugging" and value "V2.0.50727" . After doing all this things still Iam getting the same debug error.
Pls anybody can give solution for this problem.
Thanks,
Prakash
|
|
|
|