|
Yes, we are. We're also smart enough to NOT write a students application for them!
What you're asking for is very simple stuff. This is stuff you should be able to do without even thinking about it. If you're asking other people how to do this, you've got more reading to do.
Try building a sample app that just shows its window in the center of the screen. You've already been shown how to do this in the book, so go find it. I'll give you a hint though, it's one little property change.
A very large part of writing code is acquiring the ability to teach yourself. Without that skill, you're skill set is going to be outdated very quickly.
|
|
|
|
|
Create Model class with following details.
First Name
Last Name
Address
City
State
Zip
Telephone
Follow code first or any other approach.
Using Entity Frame or simple db connection you can communicate with db to run insert/update/delete.
|
|
|
|
|
I suggest you use bootstrap css to design your form. They have pretty good form designs.
|
|
|
|
|
my requirement was to capture skype voice conversation and save that conversation in file. so later we can play back. i was searching google for any article or write up to do this job.
i got a good article whose link is http://galratner.com/blogs/net/archive/2011/08/27/how-to-record-skype-voice-conversations.aspx[^]
the above article discuss how to do it and i also download their wpf based apps and run my pc. i saw that apps is working fine. also saw that apps could capture skype conversation and save to file.
i develop a small win apps following that wpf apps but my apps is working but not being able to capture the skype conversation. i copied all the necessary function in my apps from that wpf apps. just do not understand why my apps is not working or what i am missing in my code.
here i am attaching my apps download link from where anyone can download and see the code. if possible anyone download my apps and tell me what i am missing after comparing the code with wpf based apps which u can download my from first link.
here my apps link https://onedrive.live.com/#cid=C4A6F16F34D7540A&id=C4A6F16F34D7540A!126[^]
from the above link download SkypeCallTest.zip file. it would be really good help if some one looking into my apps code after download it from onedrive. thanks
tbhattacharjee
|
|
|
|
|
Only a fool would download an untrusted file and run it. No one here is likely to do this.
You have the source to both - it should be simple for you to compare them.
|
|
|
|
|
people post source code in codeproject site and million people download those....so do u think those million people are foo?
u guys do not want to help then just lay off from the post.....why putting the comments.
tbhattacharjee
|
|
|
|
|
If you're talking about the articles, the code that people download is downloaded from this site and is available for inspection in the actual CP browser window. Anyone who downloads an untrusted ZIP file, then yes - I do consider them fools.
|
|
|
|
|
cleaver people should take rest
tbhattacharjee
|
|
|
|
|
Can anybody please tell me how does a Nullable<T> work in following scenario, where I have:
int? tmp = 10;
tmp = null;
Console.WriteLine(tmp.ToString());
Console.WriteLine(tmp.GetType());
The NRE for GetType() call seems fine but I just don't get how ToString() (and ofcourse GetHashCode() and Equals(T) ) works. I know these methods have been overridden in Nullable<T> struct from System.Object where as GetType() couldn't (becuase that is not virtual ). But since ToString() is an instance method and I am explicitely setting temp = null , how does the call get resolved?
Even if I assume temp = null sets the T @value field in Nullable<T> struct and not the instance itself, it doesn't seem possible since @value would be of type System.Int32 which can't be set to null in the first place, hence we have Nullable<int> ?
I suspect this has something to do with "Type handle" reference that resides as a part of an instance but not sure how it works given that instance itself is null .
Any explanation would be greatly appreciated.
Whether I think I can, or think I can't, I am always bloody right!
|
|
|
|
|
This gets complex...
ToString is overridden, as you say - it has to be, because a nullable type "encapsulates" the ValueType it holds, and if it wasn't then it would never work!
So when you call ToString on the tmp variable, it checks the type of variable - Nullable<int> - and calls the Nullable<T> version of ToString, without worrying about the content:
IL_002a: ldloca.s tmp
IL_002c: constrained. valuetype [mscorlib]System.Nullable`1<int32>
IL_0032: callvirt instance string [mscorlib]System.Object::ToString()
IL_0037: call void [mscorlib]System.Console::WriteLine(string)
But...GetType isn't overridden - which means that the default object version must be called, which takes a Reference parameter, not a Value type. Which means that the Nullable<T> value type needs to be boxed to convert it, and it's the boxing operation that throws the NullReferenceException, not the GetType call:
IL_003d: ldloc.0
IL_003e: box valuetype [mscorlib]System.Nullable`1<int32>
IL_0043: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType()
IL_0048: call void [mscorlib]System.Console::WriteLine(object)
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
Your right, that is complex!
Regards,
Rob Philpott.
|
|
|
|
|
As you fully understand when creating int? you actually creates a Nullable<int>, which is a structure that actually never null. In fact it has a value member that actually holds the value - that can be null.
Now, when you call ToString you call an overridden version, that has this code:
public override string ToString()
{
if (!this.HasValue)
{
return "";
}
return this.value.ToString();
}
That explains why it works even you had expected a null reference exception...
With GetType is a different story, it is derived from object and never overridden by Nullable<t>, so it will be executed on the internal value which is null, therefor it fails!
(GetHashCode and Equals are also overridden)
You may use some decompiler to see the whole class...)
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Kornfeld Eliyahu Peter wrote: it has a value member that actually holds the value - that can be null But in case of Nullable<int> , the type of that value member would be int , right? And since int itself is a structure, it can't hold null , can it?
Whether I think I can, or think I can't, I am always bloody right!
|
|
|
|
|
No, but the Nullable<T> type has an object which holds the "T" value, and a flag which says "This is null".
The actual object doesn't hold null - Nullable<T> sets the flag when you try instead.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
ok, that makes sense, thanks!
Whether I think I can, or think I can't, I am always bloody right!
|
|
|
|
|
Good question - I like it.
Regards,
Rob Philpott.
|
|
|
|
|
You flatter me, SIR!
Whether I think I can, or think I can't, I am always bloody right!
|
|
|
|
|
|
Nobody here is going to go to a random website and download a random RAR / ZIP file to look at your code.
If you want us to see it, post the relevant fragments only here and explain what you are doing, what you expect to get, why you expect to get it, and what you do get.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
Im facing "attepted to divide by zero" exception in my audio steganography code made in c#.
I think the error is near the line:
// The key must be repeated, until every bit of the message has a key byte.
double countKeyCopies = messageLengthBits / keyLength;
please provide the solution.
Krrish
|
|
|
|
|
Well, based on the code you have provided:
if (keyLength != 0)
{
double countKeyCopies = messageLengthBits / keyLength;
... Is about the only advice we can give...
If I was you, I'd be looking at why keyLength is zero, not trying to work round the fact. And that's elsewhere in your code.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
hey OriginalGriff,
Thanks for the solution
After doing that change, im facing new problem....
if (m_Stream.Position >= m_Stream.Length)
{
Console.Write("before ex");
throw new Exception("Invalid file format");
}
here this exception is fired, why position of stream is exceeding the length?
Please help...
(and i will now onwards use the key with nonzero length )
Krrish
|
|
|
|
|
This may come as a surprise to you, but I can't see your screen, access your HDD, or read your mind...
I would suspect it's related to your previous problem, and that you are just "papering over the cracks" in something that is fundamentally flawed elsewhere - what you are seeing here are symptoms, but they aren't necessarily the problem.
It's similar to you driving down the road and noticing a lot of abnormal road noise. So you turn the radio up. Then you notice that it's really difficult to steer, so you decide to use long straight roads only.
The problem is that one of your tires was flat and has started to fall apart completely. And if you don't stop and fix it you are going to have even more problems in a minute!
Stop trying to fix symptoms, and look for the source of the problem!
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
Ya bro.... i understand what u r telling, bt im new at c# coding so facing problems.
|
|
|
|
|
Please, don't use textspeak here - it can really annoy people, and that reduces your chances of getting a helpful answer.
I can't help you fix your code - I don't have a clue what you have written, and I couldn't run it if I did as I haven't got your data either - so it's going to be up to you.
Start with the "original" code - I'm pretty sure you didn't write it all - and look ate what is happening with the data there. Then look at what the code you added does to that data: that should give you clues as to what you are doing wrong.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|